First Person Collision Detection with awayphysics

Software: Away3D 4.x

Manuel L., Member
Posted: 07 February 2013 12:36 PM   Total Posts: 99

Hey,
i`m trying to create collision detection for firstperson-view with awayphysics.
i tried with collision shapes and with rigidbodies. both worked, but not in a useful way for first person collision detection.

Some questions ...

is it possible?
is it recommended?
use collisionshapes or rigidbodies?
alternatives?

would be awesome if somebody can lead me into the right direction ^^

thx!

   

John Brookes, Moderator
Posted: 08 February 2013 11:34 AM   Total Posts: 732   [ # 1 ]

Not really sure what the problem is… what you doing?

The physics CharacterDemo becomes first person view
if you just copy the ghostobject transform to the camera

//render
_view.camera.transform = character.ghostObject.transform;
_view.camera.moveUp(200);

strip out all the animation stuff and you have a moveable camera with collison.


If your only using away physics for a camera collision and dont need other physics stuff.
eg just walking around a room with no other moving objects.

You might be better using a collision bitmap.

The old Away 3 had a demo showing how
https://github.com/away3d/away3d-examples-fp10/blob/master/src/Advanced_FrustumHotelRoom.as

   

Manuel L., Member
Posted: 08 February 2013 03:26 PM   Total Posts: 99   [ # 2 ]

oh, yes you`re right, i`m sorry.
i didnt recognize the characterDemo. Thats excactly what i need.
i should take a look at the demos with more care next time.

Sorry and thank you smile

   

hfeist, Jr. Member
Posted: 06 March 2013 04:39 AM   Total Posts: 37   [ # 3 ]

It’d be great if someone updated that old hotel room bitmap collision demo for 4.1.  Tough learning curve. Any example code out there?

   

yohann, Newbie
Posted: 19 April 2013 11:28 PM   Total Posts: 17   [ # 4 ]

Did anyone find any good solutions to this? I’ve tried attaching the camera to the character in the character demo. It works, but the controls are really lame compared to how nice Away3D’s FirstPersonController works. Anyone know how to use the FirstPersonController class with AwayPhysics??

   

hfeist, Jr. Member
Posted: 20 April 2013 01:03 AM   Total Posts: 37   [ # 5 ]

I have tried the suggested rejigging of the character demo and though I have trouble understanding its use of awayphysics it works and i can at least keep from walking through walls now. If I could figure out how to slide sideways I’d be happy.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X