Back to Blog
Cactus vector 2d top down7/23/2023 ![]() Any shooting or bullet tutorial should show you how to handle bullets. You can now use shoot_direction as a vector to set the direction of your bullet when you spawn it. Shoot_direction.y = +Input.get_action_strength("shoot_down") - Input.get_action_strength("shoot_up") Shoot_direction.x = -Input.get_action_strength("shoot_left") + Input.get_action_strength("shoot_right") add var shoot_direction = Vector2(0,0) on top of your player script.reduce Deadzone value for shoot_left, shoot_right, shoot_up, shoot_down to 0.2.then go down to these actions (they are at the bottom), click the plus symbol on the right side an add right Joy Axix to shoot_left, shoot_right, shoot_up, shoot_down. ![]() Type in shoot_up (press Enter), shoot_down (press Enter), shoot_left (press Enter), shoot_right (press Enter),.view from above set for architectural and landscape natural green space design. White mockups of cosmetic packaging and plants on a wooden tray with natural leaves. ![]() So in the drop down menu go to Project > Project Settings > Input Map > Actions: 652,403 plants top view royalty-free stock photos and images found for you. All you need to do is to go to the Input map in your Project settings and set up the shooting (or look at) directions for the other Joystick on your controller. You can use the same principle for twin stick shooting controls. Thanks for the friendly peeps on discord for your help! Movedir.y = +Input.get_action_strength("ui_down") - Input.get_action_strength("ui_up") Movedir.x = -Input.get_action_strength("ui_left") + Input.get_action_strength("ui_right")
0 Comments
Read More
Leave a Reply. |