Scott Ayers
05-02-2010, 03:40 PM
Me again,
If I'm asking too many questions guys. Let me know and I'll take a break.
I'm trying to get a better grasp on how to use an object's direction of travel in scripts.
As I understand it. The direction of travel is calculated by using the vector of the object's starting position subtracted by it's last known position.
I've seen people write this as using the object's travel history to get it's direction.
So if I wanted to make a cube bounce between Y= -100 & Y= 100.
I would need to create a starting vector to use as the start position. Then create a for() loop to make the cube's position increment. And then use PI to reverse the cube's direction of travel?
And then there's the issue of speed.
I've read that if the speed is too slow. The object will get stuck at the bounce point.
So that means I have to also use speed somehow in this right?
If anyone has any examples of using and manipulating directions like this. I'd love to see them to learn from.
-ScottA
If I'm asking too many questions guys. Let me know and I'll take a break.
I'm trying to get a better grasp on how to use an object's direction of travel in scripts.
As I understand it. The direction of travel is calculated by using the vector of the object's starting position subtracted by it's last known position.
I've seen people write this as using the object's travel history to get it's direction.
So if I wanted to make a cube bounce between Y= -100 & Y= 100.
I would need to create a starting vector to use as the start position. Then create a for() loop to make the cube's position increment. And then use PI to reverse the cube's direction of travel?
And then there's the issue of speed.
I've read that if the speed is too slow. The object will get stuck at the bounce point.
So that means I have to also use speed somehow in this right?
If anyone has any examples of using and manipulating directions like this. I'd love to see them to learn from.
-ScottA
