So basically im making a td game and i dont have a enemy sprite yet but thats not my point when i have the enemy colide with a block to add rotation it grinds up against the wall but iw ont it to stay centered on the track the entire time any ideas
vs what i want through the entire track
im thinking
maybe try some complex code like:
Make it move for a certain amount of time and then when that time is done it moves before it hits the wall
Check out my game if you need help:
that didnt help
How not? It has all the code in the enemy…
Hey there!
Your issue is happening because the object has room to move forward from the wall and isn’t a proportioned square like the other objects. The best way to fix this is to use a ray cast instead of a collision.
thank you so much i will try my best to fix this error
Create an always. Create a raycast. Set the raycast to the object you would like to collide with, then select your desired length and angle. Connect the hit of the raycast with whatever you want to be activated.
I’ll give you one later.
In algebra rn
umm
he has one?
Yea…
I think the easiest solution is to make the turn blocks bigger, the issue with your current setup is that they grind on the walls after turning right? Either do this in the sprite editor or with the size % block.
You can use my system instead, but it is a bit advance to use.