Crystal Space
 Welcome, Guest. Please login or register. June 24, 2017, 04:29:35 am 1 Hour 1 Day 1 Week 1 Month Forever Login with username, password and session length
9007 Posts in 2045 Topics by 57533 Members
Latest Member: Akinshkalind188
 Pages: [1]
 Author Topic: coordinate systems in crystal space  (Read 6458 times)
raq77
Newbie

Posts: 41

 « on: April 04, 2008, 11:47:44 am »

Hello, somebody can explain me the coordinate systems used in crystal space? I have been reading that crystal space use left handled coordinate systems (axis +X rigth, axis +Y up and axis +Z into the screen), but I'm representing a particles system and it doesn't work as I hope. When I draw a particle in a certain position, it don't correspond with the position that it should.

I hope someone can help me. Thanks and excuse my bad english.

Raquel.
 « Last Edit: April 04, 2008, 11:50:51 am by raq77 » Logged
jorrit
Hero Member

Posts: 1706

 « Reply #1 on: April 04, 2008, 11:48:40 am »

X->1 is to the right
Y->1 is above
Z->1 is in front of the camera

Greetings,
 Logged
raq77
Newbie

Posts: 41

 « Reply #2 on: April 04, 2008, 11:56:22 am »

Ok, I have a room with dimensions (300,300,300). If I draw a particle in position (0,0,0) and I put the camera:
GetView()->GetCamera ()->GetTransform ().SetOrigin(csVector3 (0, -150, 0));
GetView()->GetCamera ()->GetTransform ().RotateThis (CS_VEC_TILT_DOWN, PI);

I can't see the particle. But if I put the camera:
GetView()->GetCamera ()->GetTransform ().SetOrigin(csVector3 (0, -50, -250));
I cant see the particle perfectly.

Thanks.
 Logged
jorrit
Hero Member

Posts: 1706

 « Reply #3 on: April 04, 2008, 12:01:08 pm »

Well isn't that normal? What is the problem exactly?

Greetings,
 Logged
raq77
Newbie

Posts: 41

 « Reply #4 on: April 04, 2008, 12:09:40 pm »

I need to have a vision of the scene from above (placing the camera up and down approach).

Thanks
 Logged
raq77
Newbie

Posts: 41

 « Reply #5 on: April 06, 2008, 05:58:20 pm »

Nobody can tell me how can I do this? Perhaps, it's not explained well what I need to do?

Thanks. Raquel
 Logged
jorrit
Hero Member

Posts: 1706

 « Reply #6 on: April 06, 2008, 07:02:32 pm »

Perhaps it is easier to use the csReversibleTransform.LookAt() method so that you can let your camera look at some specific point in the scene.

Greetings,
 Logged
 Pages: [1]