Jump to content

Recommended Posts

Posted

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.

Posted

I don't know if it will help at all but have you tried increasing the friction value with Entity::SetFriction? I know this effects AddForce but I have no idea if it will do anything for Move.

Posted

seems to be instantaneous for me, but without seeing an example of the code from you that would show this behavior it is hard to say what is different between our two codes. are you using 'curve' in your code?

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Posted

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

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...