Hello. I'm trying to write a script for my player and have hit a roadblock. If anyone could point me in the right direction it'd be much appreciated. To recreate, the player is a circle sprite that when you Input.GetKeyDown (spacebar) the circle (ball) jumps vertically. My issue that I can't yet figure out how to make the ball jump at the same angle relative to it's initial position, while rotating. I'd like for it to be where if the ball rotated to where the top is facing left, instead of jumping up, the ball would jump left. With 360 degrees of possible "jumps". Thanks for your time.
Not sure if it will help you but Have a look a recent post I made when I was having issues with rotation Trying to rotate an asteroid - Unity Forum Also you might want to post your code so people can see your issue
Awesome. Thanks for your input. I've just read the thread and will use it to see if I can achieve what I want after work. Even if it doesn't help my issue, learned a lot from the thread on a subject I am not familiar with. My current script is attached. using System.Collections; using System.Collections.Generic; using UnityEngine;
Did want to add that I'm not dead set on the code that I posted. That is just a code I've been using that I like that I have been trying to modify to perform the desired action. Any jump script would do, just want to be able to jump at any angle while the player object is rotating, but by one button.
I feel like I'm over explaining or under explaining so I made a animation.gif to show what I'm going for.