Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | RRocky123 |
I have 2 questions -
-
I have this player and a enemy I want to make my enemy follow this player…
-
Also I have my player’s gravity like → velocity.y += gravity * delta
where var velocity = Vector2() and var gravity =3000.0
When I print my “player.globalposition” the y position keeps on increasing.
This creates a problem.If I have enemy’s gun and in the enemy gun script I put look_at(player.globalpostion) it does work in X axis but as the y is increasing the enemy gun points downwards…
Pls help I am kind of new…
I am pretty sure that means your player is falling
ArthurER | 2020-09-30 09:01
Yeah my player is still falling even if it’s stopped so any suggestions?
RRocky123 | 2020-09-30 09:03
hard to give an informed suggestion because there is not enough information posted to do much other than guess. people will need more information to help you , the people on this site that have enough experience to help will want to see script and the scene tree for the player and the scene the player is instanced in. I am not one of the experienced people on this site but based on what information you have posted your problem is not if the enemy can aim its gun that is a symptom or a different problem , your root problem is that your players y position says your player is falling , so what is it standing on that should be stopping it from falling?
ArthurER | 2020-09-30 13:49