XNA Game Development Forums
2012/02/05 11:17:43 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: Parenting Camera to an Object  (Read 2994 times)
rstackhouse
Newbie
*
Offline Offline

Posts: 3


View Profile
« on: 2007/02/25 11:20:35 »

I'd like to see the ability to parent a camera to an object built into this engine.

It'd be nice if you could just set the head offset from the object to the camera and the engine would take care of the rest.
Logged
Tiago
Newbie
*
Offline Offline

Posts: 42


View Profile
« Reply #1 on: 2007/03/05 23:08:56 »

that sounds more like something that should not be bound to the engine, a demo on how to create that behavior would be nice but that kind of functionality depends a lot on what kind of "game" you want to do and so, in my opinion, should not be part of the engine. just the way i see it of course
Logged
Nercury
Newbie
*
Offline Offline

Posts: 8


View Profile
« Reply #2 on: 2007/03/10 12:51:46 »

I think posibility to set object as camera's target would be better.
Logged
Nemo Krad
Global Moderator
Hero Member
*****
Offline Offline

Posts: 512


I have seen the fnords


View Profile WWW
« Reply #3 on: 2007/03/10 14:31:38 »

I am sure this is discussed on another thread, but all you have to do is set the cameras position to that of the object you want to follow, the difficult bit is in the camera rotation but you should be able to do all this with the SLERP functionality.
Logged
5parrowhawk
Newbie
*
Offline Offline

Posts: 7


View Profile
« Reply #4 on: 2007/03/14 06:13:57 »

I'd suggest going one further and building in a TransformNode class which can be inserted into the scenegraph. Parent both the object and the camera to the TransformNode, then set the camera translation separately to offset it, and Bob's your uncle. This also allows for hierarchies of objects so you could have e.g. a battleship with customizable rotating turrets, or an Armored Core!
Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
MOVED: Terrain Object Show Off Board Chr0n1x 0 2270 Last post 2007/01/27 23:23:52
by Chr0n1x
Tutorial 12 :: Adding in Advanced Camera Functionality Tutorial Discussion « 1 2 3 » mikeschuld 30 10788 Last post 2007/08/01 07:00:20
by Suzume
Check if an object is facing another object..? General Discussion DaphydTheBard 4 1816 Last post 2007/03/08 22:41:54
by mikeschuld
Camera Issues Hazy Mind XNA Engine minich21 6 2959 Last post 2007/08/14 21:27:30
by mikeschuld
Camera Issues Hazy Mind XNA Engine Trano 3 2735 Last post 2008/09/17 08:27:25
by mikeschuld
Camera Tracking Hazy Mind XNA Engine muchrejoicing 4 1931 Last post 2007/05/29 19:50:23
by daenris
Camera problem Hazy Mind XNA Engine Montynis 2 1600 Last post 2007/08/02 09:54:14
by Montynis
extending the camera classes/cameramanager Hazy Mind XNA Engine Mikeske 7 1933 Last post 2009/12/16 01:46:28
by Mikeske
Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.414 seconds with 21 queries.