[Question] Player point & click movement

Hello there,

I was wondering if anyone knows how I could make player move along path, with a constant speed.

So far I've been using CurveController, which worked fine for testing, but now I want to have a constant speed everywhere along the path I've made.

What I mean is that when I "setSpeed(speed)" to my CurveController, it makes my player move from point A to point B, but the speed changed drastically, depending on the path length…

basically if I have  grid, and curve contains 2 points or 100 points, it will always take the same time to reach from Start to the End.

So my question is, what kind of controller should I use for Point & Click game, to have constant speed between nodes. (e.g. if it takes 1 second to get from node to node, then if my curve has 2 nodes, time to reach end would be 1 * 2 = 2 sec, and if I had 100 nodes, it would take 1 * 100 = 100 sec)

(PS. Sorry if I wasn't clear enought, but hopefully you get the idea what I mean)

Noone has any ideas?


i’m also making a point&click controll and i use the SpatialTransformer

where you can easy set multiply points to walk with SpatialTransformer.setPosition.

Vector3f startpos = …

Vector3f endPos = …

float time = 2; //2 seconds for pass a way of lenght 1

SpatialTransformer st = …

st.setPosition(index, 0, startPoint);

st.setPosition(index, startPos.substract(endpoint).lenght()*time, endPos);



now the speed of movement will be constant no matter how long the way is.

sry for the bad english :slight_smile: