josk Posted March 24, 2013 Posted March 24, 2013 In a Lua script i add force to an object, I can change the amount of force but if the object slows down to a stop I cant get it to move again. as an example in the update Physics bit if self.speed ==1 then self.entity:AddForce(0,0,1.0,true) end if self.speed ==2 then self.entity:AddForce(0,0,1.5,true) end if self.speed ==3 then self.entity:AddForce(0,0,2.0,true)end so if the variable ever goes to 1, the object wont move again if you then change the variable 2 or 3. not done much with Physics so any help appreciated. Quote Elite Cobra Squad
Daimour Posted March 24, 2013 Posted March 24, 2013 Try to increase force. Or decrease mass. Or play around with friction adjustments (http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/entitysetfriction-r142). Quote
josk Posted March 24, 2013 Author Posted March 24, 2013 (edited) Have tried all 3 and turning gravity off but no luck. I'm Adding force all the time, think I have this one figured out, will try to sort it out tomorrow. Edited March 24, 2013 by josk Quote Elite Cobra Squad
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.