Jump to content

LE3 Physics AddForce


josk
 Share

Recommended Posts

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.

Elite Cobra Squad

Link to comment
Share on other sites

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 by josk

Elite Cobra Squad

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...