Combine Meshes and Entitys

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
nikolaiko
Posts: 43
Joined: Mon Aug 04, 2014 8:26 am

Combine Meshes and Entitys

Post by nikolaiko »

Hi,

I want to add some objects (turrets and moving robot bots) to my level. But before this moment I used CharacterController to handle players. So, now I want to add some other physical moving objects. How I should do it? I mean, I can load static mesh or mobilemesh, but how I should set speed, angular speed, air speed and other stuff? I need to create some entity type and then load static mesh and use entity for all physics simulation, and place mesh just in same position as enity in the update method?

Thanks.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Combine Meshes and Entitys

Post by Norbo »

If you want an object to have simulated motion, use an Entity. Raw entities don't have anything like a Speed or AirSpeed property, though- if you want CharacterController style motion for the object, using the CharacterController is the best bet. If all you want to do is change velocity directly or apply forces, then raw entities will be fine.

Avoid using the MobileMesh entity if you can for performance reasons. It's many times slower than a simple primitive like a box or sphere. A graphical mesh can be transformed using the entity's position and orientation to give it an appearance.

The Getting Started documentation and its associated demo goes over these topics.
Post Reply