Jump to content

Recommended Posts

Posted

When pressing directly "S" in the game to make object run backwards it runs forward even with force displayed as negative in screen.

 

How to test :

Download map

Attach script plane.lua to the little blue rectangle

Run the game and press "S" key

bug.zip

Stop toying and make games

Posted

you are adding a minus before a value that is already a minus value.

self.entity:AddForce(0,0,-self.forceSpeed ,false)

so you are saying: - -30, which results in + 30.

 

Just remove the minus to solve it.

  • Upvote 2

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.

×
×
  • Create New...