Brunstgnegg
04-12-2010 07:31:01
Hello everyone!
New user here, first post.
This is not technically an OgreBullet question but hopefully someone can help anyway. From what I understand OgreBullet doesn't have any kinetic character controller so using the character demo from Bullet I created a Kinetic Character controller and added it to my world. This works for everything except planes. I've tested it against dynamic and static boxes, trimeshes, dynamic and static convex hulls and they all work but every time the character controller collides with a plane the program crashes with the exception "Access violation when reading location..". Also, dynamic boxes and convex hulls collide correctly with the plane, only the character controller to plane collision behaves this way. Any ideas?
Second question is about compound shapes. Whenever I create a compound shape it straight away goes flying and spinning through the air at an enormous speed even though I explicitly set LinearVelocity to 0 and clear all forces after creation. My guess is that this has something to do with some SceneNode - Shape interaction that I am unaware of. I create the compound shape likea this:
Create a SceneNode n
for every Entity e I want to include create a child c in n
- add e to c
- add transforms to c as required
send n to PhysicsHandler
create compound shape comp
for every child c in n
- get entity e from c
- create convex shape conv from e
- add conv to comp
create body with n and comp
Am I doing it wrong?
New user here, first post.
This is not technically an OgreBullet question but hopefully someone can help anyway. From what I understand OgreBullet doesn't have any kinetic character controller so using the character demo from Bullet I created a Kinetic Character controller and added it to my world. This works for everything except planes. I've tested it against dynamic and static boxes, trimeshes, dynamic and static convex hulls and they all work but every time the character controller collides with a plane the program crashes with the exception "Access violation when reading location..". Also, dynamic boxes and convex hulls collide correctly with the plane, only the character controller to plane collision behaves this way. Any ideas?
Second question is about compound shapes. Whenever I create a compound shape it straight away goes flying and spinning through the air at an enormous speed even though I explicitly set LinearVelocity to 0 and clear all forces after creation. My guess is that this has something to do with some SceneNode - Shape interaction that I am unaware of. I create the compound shape likea this:
Create a SceneNode n
for every Entity e I want to include create a child c in n
- add e to c
- add transforms to c as required
send n to PhysicsHandler
create compound shape comp
for every child c in n
- get entity e from c
- create convex shape conv from e
- add conv to comp
create body with n and comp
Am I doing it wrong?