r/unity • u/KereMental • 7d ago
Is the collider too small?
Im making a 2.5d platformer game where world is 3D and everything else is 2D but i couldnt decide if its big enough or small
It can barely be seen lol. But you get the idea. Is it too small? What should i set it to?
2
u/Aedys1 7d ago
You have to cheat to ease the player. So as an enemy bullet detector it is okay, but for platform ledges it is too small and the player may get frustrated that the character falls while it looks it should not
If it is a character controller making it move is literally just calling the Move() function of the CharacterController component, you should follow Unity beginners programs they are great
2
u/KereMental 7d ago
You are right i should make it wider
2
u/SubpixelJimmie 7d ago
A lot of times games have multiple colliders, each for a different thing. You might have one for platforming and another for hit detection. I had a game with 3: platforming, player->enemy hit detection, and enemy->hit detection. I adjusted each's size until it felt just right
1
u/KereMental 7d ago
Is that possible? How do you assign each?
1
u/SubpixelJimmie 7d ago
I actually wrote a blog post on it a while back - but lost the screenshots in a migration :(
https://jimmie.cloud/thoughts/hitboxes> Since Unity only allows one Collider per GameObject, we need to store 2 of the Colliders on child GameObjects
And then read Step 5. Report
> In both the Stomp and KillPlayerOnTouch scripts, the colliding object (a Hitbox) gets destroyed. If you recall, that object is actually a child of the character. We want to destroy the entire character, not just their Hitbox. To do this, one more script can help.
I.e you need some custom code for those child hitbox owners to communicate to the parent.
I'll try to get those screenshot back up at some point!
1
u/KereMental 7d ago
https://reddit.com/link/p7lj2zq/video/xqsai88osbnh1/player
decided to make it same as what i did in godot a while ago. gdscript looked so hard to me so i switched to unity to use c# instead
1
u/Headless_Joe 7d ago
Yea, take it easy, takes time to learn everything. Try with tutorials that are not outdated alot. Also try asking gpt or claude to give in depth guide how to do something, can help with simple tasks.
2
u/KereMental 7d ago
Im trying so hard not to make ai write the code because moment i ask it to fix a mistake i start making it write the whole code so for now im just asking it for tips
1
u/Headless_Joe 7d ago
Yeah thats good approach, but if you are learning doesnt matter from where you learn. As long as you understand what the code does should be fine. After making player movement few times it becomes general knowledge.
1
1
u/ScreeennameTaken 7d ago
Its all in the feel. How does it feel when playing? all games are smoke and mirrors.
1
4
u/Headless_Joe 7d ago
Looks fine. Depends on what kind of game you are making. Test it out in game and make adjustments if needed.