Movable crosshair
by Tom · in Game Design and Creative Issues · 06/23/2006 (11:06 am) · 5 replies
Hi, is me...again
i dont know if this is even possible.
but i am working on a mech type game, and i have 4 buttons for movement, 4 buttons for torso tilt, and then i wanted the crosshair to be moved on the hud without moving the torso or body, so that u could be walking in a streight line, and aim in a corner or in the middle or somewhere else on the screen (sort of like mech warrior 3)
any clues if this is possible?
resources?
ideas?
any input is greatly appreciated!
so thanks in advance
-tom-
i dont know if this is even possible.
but i am working on a mech type game, and i have 4 buttons for movement, 4 buttons for torso tilt, and then i wanted the crosshair to be moved on the hud without moving the torso or body, so that u could be walking in a streight line, and aim in a corner or in the middle or somewhere else on the screen (sort of like mech warrior 3)
any clues if this is possible?
resources?
ideas?
any input is greatly appreciated!
so thanks in advance
-tom-
#2
it wouldnt be really good it it looked liek a mouse coursor
06/23/2006 (2:46 pm)
But can i then also have a special png image for the crosshair?it wouldnt be really good it it looked liek a mouse coursor
#3
and then later do this
grep the codebase for "new GuiCursor" for more examples.
06/23/2006 (3:30 pm)
Do thisnew GuiCursor(MyOwnCursor)
{
hotSpot = "7 0";
bitmapName = "./CUR_MyOwn.png";
};and then later do this
Canvas.setCursor(MyOwnCursor);
grep the codebase for "new GuiCursor" for more examples.
#4
since its been a long while
i got the cursor object and all that nicely,
but how could i have is to that the weapon fires to the spot on the screen where the cursor is there
currently i have a raycast that goes into the screen and return the location of whatever it hits, then i am trying to pass that location into the projectile as a vector and send it on its way, right now i have little luck with the vector. maybe im doing the raycasting wrong.
has anyone ever tried to ray cast a screen location into the 3d world?? did u have success? and what did u do/try?
08/20/2008 (4:49 pm)
Alright jsut a small updatesince its been a long while
i got the cursor object and all that nicely,
but how could i have is to that the weapon fires to the spot on the screen where the cursor is there
currently i have a raycast that goes into the screen and return the location of whatever it hits, then i am trying to pass that location into the projectile as a vector and send it on its way, right now i have little luck with the vector. maybe im doing the raycasting wrong.
has anyone ever tried to ray cast a screen location into the 3d world?? did u have success? and what did u do/try?
#5
Have you made sure the raycast is working properly? Create an object, note it's position, then echo out the results of the raycast found position, and compare. Make note of your own position as well, so you can see if it's a collision problem.
08/21/2008 (9:08 am)
Uhm, do you mean you passed the location returned from the raycast directly into the spawned projectile's initial velocity field?Have you made sure the raycast is working properly? Create an object, note it's position, then echo out the results of the raycast found position, and compare. Make note of your own position as well, so you can see if it's a collision problem.
Torque 3D Owner Sean H.