Teleport EntityMover

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Garold
Posts: 60
Joined: Fri Sep 23, 2011 5:17 pm
Location: Liverpool, England

Teleport EntityMover

Post by Garold »

I use an entitymover to attach a shield to an enemy. After the enemy dies, I teleport the character off to Limbo, when it respawns I teleport the enemy character near to the player. The problem is the entitymover for the Shield, it's causing problems, presumably the shield is rushing across the world to the new location based on the targetposition. Can I teleport the entity mover instead of using target position.

Just read that back and it sounds unclear, but I can explain more if you don't get me.

Thanks! :)
BEPUphysics rules my world
http://cloneofduty.com
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Teleport EntityMover

Post by Norbo »

The EntityMovers operate on velocity. If you want to make the entity truly teleport, then just set the Position/Orientation properties directly.
Garold
Posts: 60
Joined: Fri Sep 23, 2011 5:17 pm
Location: Liverpool, England

Re: Teleport EntityMover

Post by Garold »

I can't even remember why I coded a mover and a rotator for the shield!

I have removed them and now directly set the worldtransform of the shield shape to the animation bone's transform. Now it's a rock steady 60 fps on respawn. I just tested it and everything is fine; the shield still protects the enemy.

Well that's good news, 30 less movers and 30 less rotators :)

Thanks Norbo, as always you are the man.
BEPUphysics rules my world
http://cloneofduty.com
Post Reply