Rotating an axis to create height change for obj
Hi there. I'm making a minigolf game for a game engines class and one thing we need to implement is when the ball goes up or down hill. I currently have an algorithm to find the upward/downward angle I want the ball to move when it reaches a hill, however I'm not quite sure what do besides fancy math.
I was wondering if I could make the plane the ball is rolling on (xz plane) tilt by the angle so the ball will travel at the angle while the rest of the world remains the same.
I've come close with this idea but the origin seems to be an issue since the ball is dropped at different places on the course.