92 reputation
11
bio website
location
age
visits member for 1 year, 6 months
seen Apr 14 at 20:57

Dec
26
comment How to handle collision resolution in a top-down car game?
I do realize there are pretty complete (and complex) solutions, such as this one, but it's a bit of an overkill for my scope, specially considering a short deadline I'm working with. What I'm looking for doesn't need to be realistic, it's can be something simple, as long as it's fun :)
Dec
24
asked How to handle collision resolution in a top-down car game?
Nov
26
awarded  Tumbleweed
Oct
9
comment How to limit click'n'drag movement to an area?
Great! Thanks, David.
Oct
9
comment How to limit click'n'drag movement to an area?
Wow, very interesting. +1 too :D
Oct
8
accepted How to limit click'n'drag movement to an area?
Oct
8
comment How to limit click'n'drag movement to an area?
Great solution! I've come across something that involved two circles and a triangle, but your solutiong elegantly simplifies that. About the angle validation, I had thought of something along the lines of having a normalized vector that stood at maxAngle (and another at -maxAngle) from playerForward, which could be multiplied by the length of C->M in case it was of bounds, angle-wise. I'm assuming your solution of rotating M around C would be less costly, is that right?
Oct
8
awarded  Editor
Oct
8
revised How to limit click'n'drag movement to an area?
added 80 characters in body
Oct
8
comment How to limit click'n'drag movement to an area?
Really? I figured an algorhithmic solution or even pseudocode would help. I'll edit the question anyway, just in case.
Oct
8
comment How to limit click'n'drag movement to an area?
Arent waypoints related to pathfinding and such? Also, mathematically defining the gray area is one of my problems :P I think I could figure out something like a rectangle or even a circle, but that kind of shape, with two arcs for sides and two other sides on an angle... It's a bit over my head.
Oct
7
asked How to limit click'n'drag movement to an area?
Oct
5
awarded  Scholar
Oct
5
accepted How to implement curved movement while tracking the appropriate angle?
Oct
5
comment How to implement curved movement while tracking the appropriate angle?
Thanks, Arthur, that cleared things up. Although I've figured I'll implement the desired speed a bit differently. Since I'll need all the points in the curve to draw the line anyway (the line will indicate the path the car will follow once you end your turn), I'll just build a class to represent the curve and store all the necessary points. Whenever the distance between two points isn't long enough, I'll just get the next one until it's enough.
Oct
4
comment How to implement curved movement while tracking the appropriate angle?
Thanks, I actually had come across that question, but I hadn't tried to implement it yet, since I figure I'd need a few lessons in Khan Academy first, to be able to do it :P @Arthur's solution seems a lot simpler though, so I'm thinking about giving it a shot instead.
Oct
4
comment How to implement curved movement while tracking the appropriate angle?
Thanks for the answer, Arthur! In your Bezier function, is continue the control point? It's a bit different from what I'm currently doing, which is (1 - t)² * p0 + 2 * (1 - t) * t * p1 + t² * p2, p1 being the control point. Also, I was aware of the problem of uniform movement in the curve, and I your solution seems very interesting, But how can I know it was too close for a whole step? Do I need to get the length of Q(currentVal) - Q(currentVal+stepSize)?
Oct
3
awarded  Supporter
Oct
3
awarded  Student
Oct
3
asked How to implement curved movement while tracking the appropriate angle?