75 reputation
8
bio website
location
age
visits member for 2 years, 5 months
seen Sep 8 at 17:57

Jun
4
awarded  Popular Question
Apr
7
awarded  Popular Question
Apr
6
awarded  Popular Question
Nov
30
comment Arrive steering behavior
Ok I will see if I can come up with something to make use of more force if there is any available, because as I mentioned earlier right now if max speed is for example 16 no more force than 16 is used even if I set max force to 100 it seems. One thing I noticed when I was playing around a bit was that when I remove deltaTime from the velocity calculation the object decelerates nice and sharp with my original code. However this change also means my objects reach max speed after just one Update() call which is bad. I think deltaTime should be there I just found the result interesting.
Nov
30
comment Arrive steering behavior
What do you mean when you say the "difference" is the pseudo code only uses speed not acceleration? different oppose to what? my current code uses speed as well. I tried to implement code in my arrive method from the pseudo code and objects do stop if I use a very big slowing_distance, but then it takes ages to reach the target. Looking at your second link, that animation shows pretty much how I want it but I cannot get anywhere near that sharp deceleration. If my object would max the use of force when decelerating I believe I could start slowing down much closer to the target like I want.
Nov
25
comment Arrive steering behavior
Thank you that makes sense, since I want to be able to stop pretty hard I thought I would increase the max force. I set max force to 100 and max speed to 16, when logging the force used each time step it never seems to use more than what max speed is set to and this happens when the object is standing still and is about to start moving for the first time -> desiredVelocity.Length() = max speed and Entity.Velocity = 0. If increasing max force doesn't make the object use all the force it needs to stop in time what should I do?
Nov
25
comment Arrive steering behavior
I still get the oscillating behavior, I tried many different threshold values. Also the book uses the distance > 0 comparison and apparently it works. Thanks for trying to help.
Nov
25
asked Arrive steering behavior
Jun
9
accepted Sliding collision response
Jun
9
comment Sliding collision response
Took a break from this but I guess using -1.8 will have to do. Thanks for all the help.
Jun
3
awarded  Supporter
Jun
3
awarded  Scholar
Jun
3
accepted Circle inside circle collision
Jun
3
comment Circle inside circle collision
I have found what appears to be a solution for my special case now. As far as I can tell everything works great now, just need some more testing but I will mark this question as solved. Thanks for all the help.
May
31
comment Circle inside circle collision
Thanks seems to work perfectly. When finding k variables like for example d and k sometimes get values like -0.000000000000033750779948604759 and -0.00000000000013500311979441904 etc., to prevent the algorithm from failing I simply set values very close to 0 to 0, from what I can tell this is ok to do. Now I just have to find a solution for the special case when the small circle starts outside the big one and moves inside it.
May
30
comment Circle inside circle collision
It works pretty well now to rotate the position and velocity by an angle. One problem though is right now it always rotates counter-clockwise no matter the direction of speed. Using V*t/(R-r) the V*t I use is double arcLength = (destinationPosition - collisionPoint).Length(); i.e. the distance left to travel after the collision, I believe this is the problem since this will always give me a positive angle. How can I solve this?
May
30
comment Circle inside circle collision
Ok thanks will check it out.
May
30
comment Sliding collision response
Thanks a lot, looks good. If I remember correctly I implemented something similar as your picture shows and that's when I got that oscillating behavior, especially noticeable at low speeds. A value of -1.8 made it a lot better though, any lower like for example -1.7 made the puck travel almost the entire corner before it failed. But the closer to -1.0 I go the earlier it fails. Will try your new suggestion tomorrow.
May
30
comment Sliding collision response
Says the page does not exist when I click the link.
May
29
comment Circle inside circle collision
Sure we can use the chat, not sure how it works here though but I will be around tonight. I think my collision detection code is not working properly and I don't completely follow the part about finding k.