#Implementing Camera Relative Player Movement

11 messages · Page 1 of 1 (latest)

floral orbit
#

if youre saying that the player should move toward the direction that the camera is facing, then getting the angle of the camera then do some math should works.

#

this method on Vector2https://docs.godotengine.org/en/stable/classes/class_vector2.html#class-vector2-method-rotated

#

will rotate the vector by some angle amount in radians

#

try experiment with it on your input_dir with the camera’s angle

#

adding the camera angle directly may not be sufficient, like resulting angle maybe off by some amount of n * pi. if youre lucky you may not need to do anything else.

#

if you do not want to calculate anything and just want it to work then try fiddling with the offset amount by some pi (me all the time)

floral orbit
#

any will work as long as it tell the rotation of the camera in angle (rad)

#

so probably angle

#

i suppose

#

just try it out of that works

#

another way to learn is experimentation