make pointer on terrain

nevarim

03-03-2011 12:29:12

is with mygui that i can use pointer on terrain when i click? if yes how?

(tell me if you don't understand and i try to explain better)

Neva

Altren

03-03-2011 17:47:25

To get 3d position where you clicked you can create camera to viewport ray and then check intersection with terrain or other objects:
MyGUI::IntPoint mousePosition = MyGUI::InputManager::getInstance().getMousePosition();
MyGUI::IntSize size = MyGUI::RenderManager::getInstance().getViewSize();
Ogre::Ray ray = mCamera->getCameraToViewportRay(mousePosition .left / float(size.width), mousePosition .top / float(size.height));
// ... check intersection

nevarim

03-03-2011 19:06:24

and for create a single round white that enlarge itself when i click?

what widget i must use? or mouspointer ? its an animation? how can i do it?

(there is a tutorial for make it?)

Altren

03-03-2011 22:01:11

Depends on what you actually need. And looks like it's not about terrain at all. Could you explain better what you want as result (or find some screenshot/video of similar functionality).

nevarim

04-03-2011 09:30:36

http://www.youtube.com/watch?feature=pl ... zDVZ3nBiGg

this is a video of neverwinter night 2, look on ground where mouse click

Altren

04-03-2011 10:16:26

Why you asking this in MyGUI forum? This is not about GUI at all. Use Mesh/Decal/particle/whatever you like.

nevarim

04-03-2011 10:21:03

i ask here because it seems a gui usage :D i ask for it on ogre forum :D

thanks :)