- Home /
Move an object toward an angle in 2d space
I want to take an object (sprite in center of screen) and move the parent object (game object holding camera, and sprite) in the direction of the sprite's angle.
pseudo code:
spin sprite in 2d space using input
get angle of sprite
move other game object in direction of sprite angle, in x,y 2d space.
visually speaking, it's a ship in the center of the screen, turning around. the camera is locked in it's z axis following the player's x,y (so no depth). there is a starfield behind the player. I'm basically trying to make it seem like the player is moving through space. The stars should be flying by based on the angle of the ship.
Your answer
Follow this Question
Related Questions
Camera, Offsetting the Transform.LookAt 2 Answers
Pan Orthographic Camera 0 Answers
Rotating An Object On Its Axis Once 3 Answers
2D Camera Rotation Along Level Boundaries 1 Answer
Can someone help me fix my Javascript for Flickering Light? 6 Answers