Jump to content

Move keeps going


Rick
 Share

Recommended Posts

If you call Move() on an entity in the main loop when a key is held down when you release the key the entity slowly comes to a stop. It's like move is adding it's value and slowly goes back to zero over multiple frames. Is this expected? I would think Move() should only move the passed in value in that given frame. I love Move() because it's relative to the rotation of the entity so moving "forward" is as easy as passing in a value to the z parameter, but this accumulation and slowly going back to zero is strange behavior. If this is correct behavior how can I mimic Move() but have it only move the passed in value for that frame, which if there is no function call to Move() it would instantly stop moving.

Link to comment
Share on other sites

Yep, this is my bad. My camera is following a pivot that I move with Move(), but the camera has the curve function on it, so it looks like the pivot isn't stopping instantly but really it's just the camera catching up. Since I have no visual for the pivot it didn't dong on me that was what was going on.

  • Upvote 1
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...