help: camera following player through a camera path?

i searched everywhere but i can’t find the solution

my camera needs to follow the player, but the camera orientation have to change only if player is in a specific place

i tried following a path but it work, in part, during animation preview, not in-game

here is a simple example to understand what i’m talking about

Attachments


here is a video example of what i’m looking for: like crash bandicoot camera

http://it.youtube.com/watch?v=mHmFaqoauyk&feature=related

i used ipo to set the camera path.
i add a property to the camera that is the frame count, so i can add 1 to go to next camera frame.

the problem is that the camera need to “update” itself in function of player movement trought the map

if you don’t understand (my fault) please tell me

Hi thebaddie,

Sorry, I don’t understand what you are trying to do. Is there a reason why you want the camera to follow a path and not the player?

If you want the camera to follow the player (like it’s doing in Crash Bandicoot), you can use the Camera Actuator or parent the camera to the player. (If you parent it, you can either use Parent or Slow Parent.)

Clark

no in crash bandicoot the camera follow a prefixed path, the camera rotate only a bit, just to track the player

by parent or camera actuator the camera is behind the player, but if player turn camera will turn too

my task is: camera following player but only trought its prefixed camera path (location and rotation)

i think i’m on the way to manage it using IPO + Camera Actuator, it works if player go foreward camera frame increase, if player go backward camera frame decrease

the only prob is to find a way to move player accordling to camera orientation, so that foreward means away from camera and backward means near camera

Here some thoughts:
Make an IPO for the camera (with many frames for non-choppy movements I think)
On the camera logic do:
always----python: cameramove
_____----and-----------------------IPO actuator Property: frame
cameramove:


cam = GameLogic.getCurrentController().getOwner()
player = GameLogic.getCurrentScene().getObjectList()["OB<i>player</i>"]
if cam.getDistanceTo(player) &lt; <i>10</i>:
	own.frame =+ 1

replace player with the name of your player object and 10 with the distance in blender units between your camera and player.

Hope it works.

i think it could work, but if the player go backward camera go foreward, or it will not move (i think)

btw i find a solution using only bricks:

it works and it’s cool, but how i write before, i have to find a way to move player in camera local coordinates and not global one (away from camera and near to camera)