camera handling in m3g !!

Forum for discussion on 3D games for mobile platform and doubts related to M3G, Mascot capsule and other rendering engines.

camera handling in m3g !!

Postby abhasrohatgi » Tue Oct 13, 2009 11:50 am

I am designing car racing game. I want 2 know the exact and optimized method for aligning camera with the movement of car. I tried both in retained and immediate mode.Can anyone please tell me exactly what needs to be done ?
abhasrohatgi
 
Posts: 2
Joined: Tue Oct 13, 2009 11:28 am

Re: camera handling in m3g !!

Postby ladty » Thu Jul 29, 2010 12:59 pm

I'm not sure, what's the best solution, but I would add my camera into a group which follows the car (or even to the same group, or several groups etc).

Translate your camera to where you want it to have, pointing at the origin (0,0,0), add it to a group and then rotate this whole group. And if this group will have the same position as your car, it'll be always pointing at it, no matter how you rotate it. ;) That's my way, maybe not the most optimized, bud definitely easy to handle :)
User avatar
ladty
 
Posts: 24
Joined: Wed Jul 09, 2008 10:36 am
Location: Czech republic


Return to 3D Mobile Game (M3G)

Who is online

Users browsing this forum: No registered users and 2 guests

cron