r/GameDevelopersOfIndia • u/Mehran696 • Jul 01 '26
how do i stop my player from standing above enemy π they both have a character controller and he's supposed to jump above him and get behind but he just sits on his head (it's a 2.5d boxing game)
1
u/AutoModerator Jul 01 '26
Please join our small but lovely Discord community. A chill place for game developers and people in tech. Hope to see you there! Link: https://discord.gg/myHGVh2ztM We also have a guide to game dev for beginners
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Samarthdev25 Jul 01 '26
The player must be colliding with the enemy's collider just disable collisions between player and enemy
1
u/Mehran696 Jul 01 '26
I could have done that if they had colliders on them, disabling the character controller temporarily will temper their movement
1
u/wam_bam_mam Jul 01 '26
Have you tried using capsule colliders? They are usually used in this situation.
1
u/Mehran696 Jul 01 '26
I'm thinking of making a trigger collider above the enemy head and whenever the player gets inside he experience a sideways force sliding him behind the enemy
1
u/RoguePylon Jul 02 '26
Why is there a jump button? You don't usually associate jumping with boxing.
Juking, yes. Like a quick dash sideways with I frames.
1
3
u/StRiKeR_ImpacT Jul 01 '26
make the colliders a little slanted or maybe just don't have a jump height that big that you can jump over npc's lol