FortifyThisMFker! Posted October 26, 2017 Posted October 26, 2017 I was making some gibs right now and got stuck at an initial spin to the entity. Is there a way to set a rotation velocity? Quote
gamecreator Posted October 26, 2017 Posted October 26, 2017 Turn? https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_Turn Quote
FortifyThisMFker! Posted October 26, 2017 Author Posted October 26, 2017 An idea might be to set a variable for a velocity to use on Turn, and subtract form it over time to simulate a dying spin. then once you collide you need to stop that update and let physics take over? Quote
gamecreator Posted October 26, 2017 Posted October 26, 2017 Oh, if you want it to be a physics body that flies and spins by itself, you can just use the physics commands like AddTorque. https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_AddTorque Check out the other entity commands here: https://www.leadwerks.com/learn?page=API-Reference_Object_Entity Quote
Josh Posted October 27, 2017 Posted October 27, 2017 SetOmega sets rotational velocity: https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_SetOmega Quote My job is to make tools you love, with the features you want, and performance you can't live without.
FortifyThisMFker! Posted October 27, 2017 Author Posted October 27, 2017 Thanks gamecreator and Josh, I used SetOmega in the Start function and it works perfectly. I'll try playing with AddTorque on my next project, which I think I want to try something like Descent and Forsaken 64. self.entity:SetOmega(Vec3(math.random(-8, 8), math.random(-8, 8), math.random(-8, 8)), true) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.