Page 1 of 1

Combine Meshes and Entitys

Posted: Thu Dec 25, 2014 10:14 am
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.

Re: Combine Meshes and Entitys

Posted: Fri Dec 26, 2014 7:24 pm
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.