Game Development Community

Attach camera to AI player

by David Sill · in Torque Game Engine · 12/19/2004 (1:53 pm) · 2 replies

I am working on getting a camera to mount to a player (or object) that will then follow a path with no user intervention.

I have gone through the codeSampler tutorials and can watch the bot running around, but i can't mount the camera to him.

I think it probably has to do with server/game.cs, but all I can seem to do is crash the engine or make the bot disappear.

All I need to do is attach the camera to his head. It seems really easy and probably is, but right now it is beyond me.

Any suggestions or blocks of code?

#1
12/19/2004 (3:38 pm)
Use the advanced camera.
#2
12/20/2004 (5:56 am)
I have a camera on path, but I need to affect triggers, pause on path and resume, and adjust speed. Will a camera on path do all this? I tried but what I have now won't trip a trigger.

Being able to adjust speed dynamically would be a big plus.

Having an advanced camera behind/around/over the player really isn't much different from what I have now - I need to attach the view to the bot, so the camera runs around by itself.

In my project I have camera on path. I am playing with the CodeSampler tutorial trying to attach the view to an AIPlayer.

It's basically a guided walkthrough, with the player having very little control and needing to do nothing but watch.

Ideas anyone?


(edited for clarity)