![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | THE HELIX |
I am creating a project where the body is made of KinematicBody 2D node.I would like to get the position of the body as a “player_pos” in GD script.For example let’s take the position of the body as Vector2(450,500).How can i make the body to move to a new position ,where the body’s position changes to new value let it be Vector2(700,800).Any suggestions?
And I forgot the body should change position when i add a code like
if Input.Vector2 (20,40) < Vector2(450,500) :
player_pos = Vector2(700,800)
and sorry for my bad english and sorry for coding mistakes.
THE HELIX | 2019-01-12 06:01
Thanks for ur help kidscancode . How can i contact u if i have further doubts in the project.
THE HELIX | 2019-01-13 13:50
Is it possible to use accelerometer in movement of a KinematicBody2D or RigidBody2d in a 2D game.
If possible can you help me in coding and movement of body ?
THE HELIX | 2019-01-13 14:19