richardl008 Posted August 13, 2016 Posted August 13, 2016 Hi, i have a simple question: I want to move a model (with GoToPoint) if i press the left mouse button, and play an animation while the model moves. I did: if (window:MouseHit(Key.LButton)) then -- Target position (in place ATM) local targetpos = Vec3(0,0,17) -- Move model player:GoToPoint(targetpos.x,targetpos.y,targetpos.z,1.1,1) -- Animate model local t = Time:GetCurrent() player:SetAnimationFrame(t/100.0,1,1) local playerpos = player:GetPosition(true) end My results moves the object, but the animation isn´t played well (only if i press the mouse button again), and any correction did not work. Quote
Rick Posted August 13, 2016 Posted August 13, 2016 Use the animation manager class. Look at the AI scripts for example on usage. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.