- Home /
2.5D weapon aiming with cross hairs help needed
Hi, I am trying to create a 2.5D platformer game with controls similar to Worms where the keys W,S aims the cursor up and down. So far, I managed to create the game character to shoot, but it shoots in a fixed angle without any cross hairs. Any idea how can I modify my weapons to shoot in a direction decided by the position of a cross hair?
Answer by spinaljack · Apr 26, 2010 at 12:09 AM
You can use the lookat function on the gun and then feed it the mouse position data.
You may need the screen point to ray function to get a point in 3D space to aim at or you can work out the angle from the mouse position yourself.
Do you $$anonymous$$d explaining by lookat function? The feeding and screen point to ray thing? For a regular human being this means absolutely nothing.
Your answer
Follow this Question
Related Questions
Locking the Z-axis based on direction 0 Answers
2D or 3D settings for a 2.5D game? 2 Answers
Is there a way I can add drawing mechanic like in "line rider" for a 3D game? 0 Answers
Health subtracts when hit by bullit 2 Answers
transform.position.x ? 1 Answer