Rick Posted February 5, 2015 Share Posted February 5, 2015 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. Quote Link to comment Share on other sites More sharing options...
BluHornet Posted February 5, 2015 Share Posted February 5, 2015 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. Quote Link to comment Share on other sites More sharing options...
macklebee Posted February 6, 2015 Share Posted February 6, 2015 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? Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Rick Posted February 6, 2015 Author Share Posted February 6, 2015 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. 1 Quote 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.