using jit.phys.6dof to make an object pursuing another object at constant speed ?

lucas boutignon's icon

hello,
I'm using jit.phys.6dof to connect two jit.phys.body together, object 1 and object 2 . the position of object 1 is sent to the jit phys.6dof, which control the position of object 2. object 2 follow the position of object 1. this works well, however, i would like the velocity of object 2 to remain constant. when i move object 1, i would like that object 2 follows object 1 at a constant speed. but i always seem to slow down when it reaches the position of object 1.
Any ideas ? is it possible to achieve this with 6dof or should i use another object?
thank you.

Rob Ramirez's icon

there's an example patch called phys.body.velocity (search the file browser). if that's not helpful then please post your patch so I have a better idea what you are trying to solve.

lucas boutignon's icon

hello, here's where i'm situated right now . i abandoned using 6dof so i tried with simple max objects :

Max Patch
Copy patch and select New From Clipboard in Max.


i'm trying to emulate pursuit curves. in order to emulate a proper pursuit curve , the velocity of the moving target must remain constant. in the patch i sent you, the speed gradually diminish as it reaches its target. i wondered if there were any tools from jitter that could achieve this.
thanks'

Rob Ramirez's icon

you could also try using the jit.anim.drive "moveto" message:

Max Patch
Copy patch and select New From Clipboard in Max.

lucas boutignon's icon

thank you this is what i was looking for! i'm also trying to add a damping parameter , while being able to keep the speed constant when no damping is applied to the movement. i managed to create the damping effect with a pipe object feeding back the position into anim.drive :

Max Patch
Copy patch and select New From Clipboard in Max.

the damping works, but now the speed is not linear anymore ( when the damping parameter is set to 0). i'm trying to use the springto message, but i cant' find any setup where the velocity is linear. if you have any idea to solve this let met know