Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → GetThingMoveDirection?
GetThingMoveDirection?
2004-11-05, 6:34 AM #1
Hi!
I'm wondering... Is there some way to get the direction AND speed in which a thing is moving in? The thing is that I have this ball and depending on which way you kick it, it will roll in that direction, using SetThingRotVel();.
Anyone know how I should do this?

/Edward
Edward's Cognative Hazards
2004-11-05, 6:50 AM #2
GetThingMoveSize(victim); and GetThingVel(victim); maybe?

Something like VectorZ(v_pos) >= x && VectorZ(my_pos) or VectorY, something like that might work.

Just an idea.

[T0rN]
2004-11-05, 4:15 PM #3
1) Grab the object's position
2) Wait ~0.1 seconds
3) Grab it again
4) Do some crazy vector math
5) Your direction!

Id give you the formula, but vector math was never my string point... :(
And when the moment is right, I'm gonna fly a kite.
2004-11-05, 11:36 PM #4
GetThingVel(); gets the speed (VectorLen(GTV())) and direction. How you're going to apply that in P Y R format for the ball to roll, I have no idea. :(

Maybe this guy knows?

http://mathforum.org/library/drmath/view/60800.html
-Hell Raiser

↑ Up to the top!