Problem with fluent rotation
by Tomasz Chudy · in Torque Game Engine · 04/18/2007 (2:05 pm) · 3 replies
I try to rotate object based on Player class with very little angles and I don't have fluent movement.
To better understand my problem please try this:
1. Take pure starter.fps from SDK (TGE 1.5.1)
2. Change three lines in starter.fps\server\scripts\player.cs to stop "Kork"
maxForwardSpeed = 0;
maxBackwardSpeed = 0;
maxSideSpeed = 0;
3. Change in AiPlayer.cc one line to make slow rotation of "Kork"
from:
movePtr->yaw = yawDiff;
to:
movePtr->yaw = 0.001;
4. Start game, press Alt-C and fly to Kork to see his movement, you will see some small steps like clock ticking
My question is, what should I do to rotate Kork as fluent as rotating items (weapons, healthpacks) ?
To better understand my problem please try this:
1. Take pure starter.fps from SDK (TGE 1.5.1)
2. Change three lines in starter.fps\server\scripts\player.cs to stop "Kork"
maxForwardSpeed = 0;
maxBackwardSpeed = 0;
maxSideSpeed = 0;
3. Change in AiPlayer.cc one line to make slow rotation of "Kork"
from:
movePtr->yaw = yawDiff;
to:
movePtr->yaw = 0.001;
4. Start game, press Alt-C and fly to Kork to see his movement, you will see some small steps like clock ticking
My question is, what should I do to rotate Kork as fluent as rotating items (weapons, healthpacks) ?
#2
04/23/2007 (5:46 am)
Or try to look at the ai code and see how kork would normally change headings to move tward the next node in a path
#3
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9480
04/23/2007 (7:30 am)
Here's the way I do it:www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9480
Torque 3D Owner Caleb