I need help with enemy rotating towards me


#1

Hello. Soo… the idea is: Respawn of enemy… it goes to certain position and when it arrives that position it should rotate towards me… but seems what I am trying to do does not work at all. I have tried many things already. Any idea?. Thanks for your time :slight_smile:


#2

maybe your boss is over 300px try >300 instead of =300


#3

Thank you for your answer ! I already solved it with another aproach before reading your message. Now I have a new problem lol. When the image rotates… it acts like if the “tip” of the image… was on the lateral… soo the boss rotates towards me… but looking at me by his side haha :frowning:. Any idea about this problem? Thanks for your time :slight_smile:


#4

sorry i don’t understand, my firsr language is kor english :frowning: can you show a little video?


#5

is complicated to me to make a video :(.
The enemy rotates towards me looking from his side… not looking at me from his “face” the frontal part.
like this



#6

hi maybe it has to be with the rotation point, I suppose it gets the rotation point referenced to the 0,0 point of the sprite which I supppose is the upper left pixel


#7

I am not sure what the engine choose as rotation point. I just have “Center” and “Origin” I already have tried with different ways on those. Thank you for your answer :smiley:


#8

you need to rotate your sprite, either in the properties of the object (editing the image itself), either using an event (adding X degrees).
Try 90 degrees, see if it’s better or worse, and adjust until you find the right angle.


#9

Thank you for your answer :smiley: Yes. it works if I rotates the sprite. But then the enemy shows up rotated… instead of looking forward. I want the enemy go to certain position going forward and then in that position… rotates towards me.


#10

Then you need to change its angle as you want when it has to go forward?