[SDL] OFF Topic Iso Mouse

Patricia Curtis patricia.curtis at gmail.com
Wed Apr 25 18:27:38 PDT 2007


Hi Guys
         Sorry for an off topic question but i need help with some maths and
i sure some of you have a better maths background than me, I am writing an
isometric game (not tile based) and i translate my screen mouse to isometric
no problem as i am easily working out the x and z cords on the floor of my
isometric room with,

ClickX = (int)((2*Mousey-Mousex)/2);
ClickZ = (int)Mousex+ClickX;

then i check to see if its within my room box with a simple box check and it
works a treat, but when the mouse is beyond the bounds of the room floor
area shown in blue it could be on a wall so i need to work out the
mouse position on the vertical walls green and red.

so if anyone can help me i would be grateful,

Trish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070426/ba4721ed/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Isoroom.jpg
Type: image/jpeg
Size: 7549 bytes
Desc: not available
Url : http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070426/ba4721ed/attachment.jpg 


More information about the SDL mailing list