Camera Following Object (3rd Person Perspective) - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: Camera Following Object (3rd Person Perspective) (/thread-6619.html)
Camera Following Object (3rd Person Perspective) - squidgee - Nov 30, 2003 09:53 AM
Alrighty, in RB3D, I want my camera to follow my player object(3D).
So, when my player object moves (the yaw changes, and it goes off wherever), how do I make it so the camera stays X units behind it at all times (and, X units above it)?
I'm kinda foggy on how to do it; I know it must have something with setrotateaboutaxis, but I'm not sure how to do it...any code/examples will be much appreciated!
[What goes here to make the camera stay behind it???]
Camera Following Object (3rd Person Perspective) - ERaZer - Nov 30, 2003 11:58 AM
I just added this code to the offworld project, so it should work
Hmm, I just realised you could probably use campos.Copy v instead, but I don't know since that command has been added(or at least I didn't know of it) when I used RB3D.
mShipState.mObject3D is the players object3d and view is the RB3DSpace.
Oh, and MoveUp is a method to move a object3D up that I've added. I think I took it from Franks 3D sound example.