Have enemies "shift" up walls #132
-
I haven't looked at the assembly code for myself, but it seems like enemies in the Genesis Sonic games had no "collision hitboxes" to determine their movement, but only sensors to determine what they did in response to coming in contact with terrain. Take, for example, this footage of the Burrobots from Sonic 1's Labyrinth Zone. They'll stop at sheer walls, but for these 32px blocks, they shift upwards, leading me to believe their wall sensors are placed higher than 32px specifically for this behavior. How could I go about implementing this kind of behavior? PhysicsObject.gd's push_vertical() appears to handle this sort of interaction for the player, but I can't find the conditions for it being triggered. I'd like to add support for this behavior in my project's EnemyBase.gd to have Genesis-accurate enemy behavior. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You're probably going to want to do something simpler, take a look at the flicky and scattered ring objects for reference. |
Beta Was this translation helpful? Give feedback.
You're probably going to want to do something simpler, take a look at the flicky and scattered ring objects for reference.
I'd have a raycast that points down from the top of the enemies body, and have it shift the enemy to the collision point plus the offset from the center if it detects a collision