About rays

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
User avatar
crioto
Halfling
Posts: 59
Joined: Fri Aug 11, 2006 8:34 pm
Location: Bishkek, Kyrgyzstan
Contact:

About rays

Post by crioto »

How to get position where the mouse ray intersects with 0 co-ordinate by Y-axis?
Do your work, don't be stupid
User avatar
crioto
Halfling
Posts: 59
Joined: Fri Aug 11, 2006 8:34 pm
Location: Bishkek, Kyrgyzstan
Contact:

Post by crioto »

nobody knows?
Do your work, don't be stupid
User avatar
sivael
Halfling
Posts: 95
Joined: Thu Jul 10, 2008 9:46 am

Post by sivael »

Well... I don't know how to actually implement it, but having the angle of the camera and the osition on the screen You can interpolate a vector and then You just do the math - Tales works well and it's simple.

That's it for the theory. Once I finish my own implementation of the picking system I'll post it here(if I remember of course:P)
User avatar
crioto
Halfling
Posts: 59
Joined: Fri Aug 11, 2006 8:34 pm
Location: Bishkek, Kyrgyzstan
Contact:

Post by crioto »

Thank you. Of course i can implement that way, but in my mind - the rays more simply i think, and i think they have speciality methods that's give position of intersects with some coordinates. So if they don't - i'll look another way.
Do your work, don't be stupid
User avatar
sivael
Halfling
Posts: 95
Joined: Thu Jul 10, 2008 9:46 am

Post by sivael »

If You mean rays as subdividing and colliding the object against other objects (that's the "real" ray technique AFAIK) then they're *much* slower when compared to what I said.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
sivael
Halfling
Posts: 95
Joined: Thu Jul 10, 2008 9:46 am

Post by sivael »

Oh. So that's basically what I said before:P
Just more flexible:P
Good thing there - I'll try to use it:)
Post Reply