1
$\begingroup$

Making game in BGE. I need the camera to only move back and forth(up and down the x axis) but at the same speed as my object(car). For whatever reason parenting things in BGE doesn't do anything. i have tried copying the logic bricks that make the car move but for some reason the camera does not move if the logic bricks are servo motion. Right now the camera is set as a static object and ticked as an actor. I can't change it from static to dynamic cuz this would make it respond to gravity which i do not want.

$\endgroup$
2
  • $\begingroup$ @eromod sorry. i'm quite young and haven't had time to do much blender. what does that mean? $\endgroup$
    – gamer103
    Aug 2, 2016 at 21:16
  • $\begingroup$ nvm, just found out that constraints wont work in BGE, sry $\endgroup$
    – eromod
    Aug 3, 2016 at 5:37

2 Answers 2

1
$\begingroup$

Parent the camera to the object to follow (or to any child of the object to follow).

As each other child the camera will inherit the transformations (loc, rot, scale) from the parent.

  • Ensure the parent is moving as you expect.
  • Ensure you parent the right camera

You can move the camera (e.g. with the motion actuator) while parented

As a gimmick you can enable slow "parent". This makes the "follow" a bit softer, providing better camera feeling.

$\endgroup$
1
$\begingroup$

Use the camera actuator.

It will try to keep the camera at a certain are relative to the target object.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .