jPCT-AE - a 3d engine for Android > Support

Moving an Object3D to another smoothly.

(1/5) > >>

dl.zerocool:
Hello.

I would like to know if someone know how to move an Object3D to another smoothly,
without using too much resources ?

Thank you in advance.

EgonOlsen:
Like morphing?

dl.zerocool:
No no just a simple translation algorithm :P

EgonOlsen:
I don't get it...what is a translation if not a morph in this case. Any examples?

dl.zerocool:
hmm... I didn't explain myself very well certainly. (sorry)

I want to move and object X to another object Y  position, but smoothly, and I want to use calculation time as low  as possible

The best would be to be able to render à simple vector between both objects and make the object X follow this vector.

So if needed I can apply some math to this vector to make it less straight to the other object.

I don't know if I explained myself pretty well.
I already have a way to do it. But it's not very clean, and use too much calculation.

at moment I've a function "move" proprietary to each of my objects and make them move not in a straight line to a direction.

But I've to store few last pos value to be able to decide the next point to move to.

I don't want my object to move   like this ->    ___/\/\/\/  etc... I want something more smoth like a sinus or a cos ;)

Navigation

[0] Message Index

[#] Next page

Go to full version