In your render function just keep your camera at a specific height:

function render(){
camera.look();
camera.y = 300
ctrls.update();
view.render();
}



On 13 nov, 13:04, colouredfunk <[email protected]> wrote:
> Hey, I've just realised if I look down with the mouse then navigate
> forward, the camera will actually move downwards through the floor...
> Don't know why it's doing that, as your using the MoveForward methods,
> so it should calculate it accordingly ...?...
>
> On Nov 13, 11:26 am, colouredfunk <[email protected]> wrote:
>
>
>
> > genius!!! Dude, you are seriously a life saver :)
>
> > I'll let you know how I get on :)
>
> > On Nov 13, 11:09 am, wsvdmeer <[email protected]> wrote:
>
> > > Hey colouredfunk,
>
> > > I just put up a new tutorial for my firspersoncamera and
> > > firstpersoncontrols 
> > > classes:http://wsvdmeer.blogspot.com/2009/11/away3d-firstperson-movement-and-...
>
> > > If you use these classes in combination with mycollisionclass you
> > > can set the controls.zspeed and controls.xpseed to 0 oncollision.
> > > I constantly keep track of the object i'm moving and save it's
> > > position in a Number3D for example:
>
> > > var cameraPosition:Number3D = new Number3D()
> > > cameraPosition = camera.position
>
> > > If acollisionoccures i reset the camera to it's old position
> > > (cameraPosition):
>
> > > so the code would look like this:
>
> > > function onCollision(event:CollisionEvent):void{
> > > controls.xspeed = 0
> > > controls.yspeed = 0
> > > camera.position = cameraPosition
>
> > > }
>
> > > Hope this helps :D
>
> > > On 13 nov, 11:43, colouredfunk <[email protected]> wrote:
>
> > > > Yeah JUST finished getting it working :)  I think the problem was not
> > > > having the object in 3ds Max in the middle of the scene...... I still
> > > > have to have it offset slightly, but I got it working through a bit of
> > > > trial and error!
>
> > > > Thanks so much for creating a class for it, really helping me out
> > > > here :)
>
> > > > I've now got to sort out the camera reaction to the collisions :s
>
> > > > Any tips ? :o
>
> > > > Thanks again
>
> > > > On Nov 13, 10:13 am, wsvdmeer <[email protected]> wrote:
>
> > > > > Hey colouredfunk,
>
> > > > > Did it work?
>
> > > > > On 12 nov, 15:46, wsvdmeer <[email protected]> wrote:
>
> > > > > > Hey colouredfunk,
>
> > > > > > I adjusted the UserMap class and posted a tutorial on my blog 
> > > > > > :http://wsvdmeer.blogspot.com/2009/11/away-3d-2d-collision-detection.html
> > > > > > I'm not that great at writing tutorials so if you still have a 
> > > > > > problem
> > > > > > with the class let me know.
>
> > > > > > On 12 nov, 13:12, colouredfunk <[email protected]> wrote:
>
> > > > > > > Hey Wsvdmee,
>
> > > > > > > I've been playing out with yourcollisionclass, but I can't get the
> > > > > > > 2d position to aline with the 3d world...
>
> > > > > > > Have you got any idea where I could be going wrong??
>
> > > > > > > var xpos:Number = (camera.x  / (_envWidth / _userMap.width)) +
> > > > > > > _userMap.width / 2;
> > > > > > > var ypos:Number = -(camera.z / (_envHeight / _userMap.height)) +
> > > > > > > _userMap.height / 2;
>
> > > > > > > _envWidth and _envHeight are the dimensions of the 3ds file...
>
> > > > > > > Thanks
>
> > > > > > > On Nov 10, 4:21 pm, colouredfunk <[email protected]> 
> > > > > > > wrote:
>
> > > > > > > > Sweet thanks!!!
>
> > > > > > > > Can't wait to see it :)
>
> > > > > > > > On Nov 10, 6:30 am, wsvdmeer <[email protected]> wrote:
>
> > > > > > > > > Hey ColouredFunk i'll try and create a FirstPersonCamera 
> > > > > > > > > class that
> > > > > > > > > handles the movement/look andcollisionin combination with my 
> > > > > > > > > UserMap
> > > > > > > > > class.
> > > > > > > > > I think i could be done by the end of the day and then i'll 
> > > > > > > > > post it
> > > > > > > > > here.
>
> > > > > > > > > Greetz WS
>
> > > > > > > > > On 10 nov, 00:06, ColouredFunk <[email protected]> 
> > > > > > > > > wrote:
>
> > > > > > > > > > That's the bit I'm really struggerling with; the reactions 
> > > > > > > > > > / the resolves.
>
> > > > > > > > > > Msvdmeer would it be possible to share your camera movement 
> > > > > > > > > > methods
> > > > > > > > > > with the integration of thecollisiondetection? This would 
> > > > > > > > > > really
> > > > > > > > > > save me from going bold :)
>
> > > > > > > > > > thanks..
>
> > > > > > > > > > On Monday, November 9, 2009, Li <[email protected]> 
> > > > > > > > > > wrote:
> > > > > > > > > > > No, unfortunately JigLibFlash doesn't support complex 
> > > > > > > > > > > meshes yet (as far as I know) and you have to reconstruct 
> > > > > > > > > > > everything with primitives.

Reply via email to