• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Push entity

Umbrella

Refugee
Hello,

I have an Entity instance (in a C# script), how can I apply a motion to the entity (eg push it one hex away, make it jump in the air... ) ? Is there a way to apply an acceleration, rather than teleport it ?

Thank you !

 
I played with this a bit in Unity. Kinda worked but if I made things moveable they often did not check for terrain collision. I was able to move mesh based particles around well enough, but those don't last forever. It might be doable, just would need more experimentation.

 
Thank you Xyth.

I guess I can check collisions myself (with static blocks at least, might be harder with other moving entites).

What method of the Entity class did you use to move it ?

 
well, i pushed blocks mostly. TFP has a hidden core collider which is what you would push but it wont likely move until you turn off the entity physics. So it would ragdoll a second while its moved

 
There should at least be some set_position method used by the teleport command, no ? Also, we could mimic or trigger what the move/jump commands does ?

 
Back
Top