Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Get camera position (actual)  (Read 700 times)
harikumar001
Customers
Community Member
*****
Posts: 65


« on: August 03, 2010, 03:21:21 AM »

Hey guys,

Could anybody please help me find the actual position of the camera. Not the position in world space, but the actual position without any transformations.

For instance a mesh may have vertices (-1.5, 1, 3) but position maybe (100,300,50). Similarly I  am trying to get the actual position of the cam which may be at world position 600, 20, 500. Hope you get my query.

Regards

« Last Edit: August 03, 2010, 03:46:29 AM by harikumar001 » Logged
Lenn
Customers
Community Member
*****
Posts: 876

+/-


« Reply #1 on: August 03, 2010, 04:50:37 AM »

An position of a camera without any transformations is 0,0,0. That's probably not what you're looking for tho, and you're not explaining it very well. The actual position IS the world position in TV units. What is "vertices" , is that a 3d position, or a group of vertices, like a sphere?

Oh, if you mean the camera position relative to the mesh then (pseudocode):

PositionMesh = New TV_3DVECTOR : Get
PositionCamera = New TV_3DVECTOR : Get
RelativePositionCamera = PositionCamera - PositionMesh

That it?
Logged

TV3D 6.5 Community Docs - Read, use and please contribute!
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks