EntityRotator and EntityMover Versus Manually Doing It
Posted: Sun Nov 25, 2012 6:30 pm
Hi,
I have a helicopter that the character spawns inside. I've been calculating a path and evaluating this path for the EnityMover and EntityRotator. That approach works fine. When the helicopter moves or rotates the character rotates with it and stays within the helicopter interior.
I have recently being working on a more "flexible" method, as I'd like the helicopter to hug the terrain more and avoid obstacles along the way. I've made the helicopter kinematic, I move it by adjusting its LinearVelocity and I rotate it by calculating a new quaternion for the Body.Orientation based on the helicopter's Yaw.
The problem I have is the character will not collide properly with the inside of the helicopter and will fall out if the helicopter turns too quickly. I have a damage system that, I had to switch off, (it checks info.NormalImpulse of a Pair.Contact) as it was being triggered when the helicopter moved.
I must be doing something very wrong![Smile :)](./images/smilies/icon_smile.gif)
Is the problem caused by me manually messing with LinearVelocity and Orientation, should I be using a different approach?
Thanks.
I have a helicopter that the character spawns inside. I've been calculating a path and evaluating this path for the EnityMover and EntityRotator. That approach works fine. When the helicopter moves or rotates the character rotates with it and stays within the helicopter interior.
I have recently being working on a more "flexible" method, as I'd like the helicopter to hug the terrain more and avoid obstacles along the way. I've made the helicopter kinematic, I move it by adjusting its LinearVelocity and I rotate it by calculating a new quaternion for the Body.Orientation based on the helicopter's Yaw.
The problem I have is the character will not collide properly with the inside of the helicopter and will fall out if the helicopter turns too quickly. I have a damage system that, I had to switch off, (it checks info.NormalImpulse of a Pair.Contact) as it was being triggered when the helicopter moved.
I must be doing something very wrong
![Smile :)](./images/smilies/icon_smile.gif)
Is the problem caused by me manually messing with LinearVelocity and Orientation, should I be using a different approach?
Thanks.