The object has a beginning coordinate (x1, y1, z1) and end coordinate (x2, y2, z2).

I have velocity and time. How can I calculate the distance (x3, y3, z3) traveled during this time?.

```
Vector3f pointStart = new Vector3f(0, 0, 0);
Vector3f pointEnd = new Vector3f(20, 20, 20);
Vector3f delta = pointEnd .subtract(pointStart );
Vector3f dir = delta.normalize();
float traveled = velocity * time;
Ray ray = new Ray(pointStart, dir);
ray.setLimit(traveled);
```

i need something like that

```
Vector3f pointTraveled = ray.getLimitPoint();
```

Google didnâ€™t help meâ€¦

If I am understanding your problem correctly, you should do
`Vector3f pointTraveled=dir.mult(traveled);`

1 Like

pspeed
March 27, 2022, 8:28am
#3
start.add(dir.mult(traveled));

â€¦but this is also kind of a strange thing to want to know.

What is it that you are actually trying to do?

1 Like

The object starts moving from one place to another. I need to save the position of the object by the button, but I donâ€™t want to use simpleInitApp(), only math.

so simple)) thx, this is what i need

1 Like

pspeed
March 27, 2022, 4:42pm
#6
â€śby the buttonâ€ťâ€¦ meaning the user clicks a button and you want to save the position of the object?

â€¦but canâ€™t you just ask the object its position?