Relative Movement

Hi Everyone,

I’m not really good with math. Is there an easy way I could set a model’s angle to face some given point and then make that model move towards that point? I meant make the model move “forward”, say make some actor instance walk towards something.

Hope you could help me out. Thanks! :smiley:


model.setY(model, speed * globalClock.getDt())

replace “speed” by the speed of your model, in panda units relative to the model per second.
Alternatively, you can use intervals to move it towards that point.

Thank Pro! This worked like a charm!

I just read it now, apologies for the late reply. Your reply was so fast however. A lot of thanks! :smiley: