0
\$\begingroup\$

i want to create a game like angry birds but in orthographic mode 3D .

i want to give the player the ability to Jump to the Red and Blue Platform (see the picture below) with the Click, Drag and release however i dont know how to ge the exact direction wanted by the player and with the orthographic view

Camera.ScreenToWorldPoint(Input.mousePosition)

it gives me a weird vector so i would like to hear ur approaches to solve this.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ A cursor is a 2D control, but you want to be able to control the position of a 3D point (the drag point). Homeworld does it by having you choose X and Y with one click, then in a second step choose Z. Raycasts let you put the point on any visible surface, which might work for you if you have a lot of scenery. You could have the game secretly be top-down 2D that just has graphics that look like orthographic 2D, for an Escheresque feeling. \$\endgroup\$ – Foxwarrior Apr 28 at 5:16
  • \$\begingroup\$ How many degrees of freedom are important for your game? We know we need to be able to choose the bearing of the arc, to head left to the blue tower or right to the red tower. Do we also need to choose the range of the arc, say if we wanted to hit a "pink" tower that's halfway between the white tower and the red? And do we need to also be able to choose the incline of the arc, to land on a destination tower that's taller or shorter? With the 2D input of the screen we can reasonably easily serve two degrees of freedom, but if your game needs all 3 we need to do something more special. \$\endgroup\$ – DMGregory Apr 28 at 7:35
  • \$\begingroup\$ @Foxwarrior If you could provide me a video on Homeworld that puts in action that mecanic that would be very helpful :D but making the game 2D is impossible because it s just a little jump mecanic for the game. \$\endgroup\$ – zied Apr 29 at 0:52
  • \$\begingroup\$ @DMGregory 1. I Want the player to move in 3 axes with no rotation (3 degree of freedom) 2. Yes we can choose the range of the arc in fact it is going to be displayed on the screen 3. Exactly we are going to choose the incline too. and now by answering ur question i ve realized alot of problems ...like How can i distinguish between a player who wants to jump to the blue platform or who wants to jump to the red platform with an incline .. it s kind of the same input . So do you have any idea on how to do this? (for example making a single platform and adjusting the jump to go the that platform? \$\endgroup\$ – zied Apr 29 at 1:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.