Game Development Community

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) ?

#1
04/23/2007 (5:23 am)
Take a look at the Item code and see what they did, then see if you can adapt it at all.
#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