josk Posted March 24, 2013 Share 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 Link to comment Share on other sites More sharing options...
Daimour Posted March 24, 2013 Share 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 Link to comment Share on other sites More sharing options...
josk Posted March 24, 2013 Author Share 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 Link to comment Share on other sites More sharing options...
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.