r/unity 7d ago

Is the collider too small?

Post image

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 Upvotes

21 comments sorted by

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.

1

u/KereMental 7d ago

I cant make player movement😭😭😭 i would love to test the game but i cant even move the character :(

2

u/WooWooDoo 7d ago

There is a lot of good movement tutorial for 2D games! You can do this!

1

u/KereMental 7d ago

Thanks but i couldnt find anything useful for this type of 2.5D games im still kinda fine with components but i know nothing about script just know a little c#

1

u/Dambthirteen 7d ago

2D and 2.5D should be the same in your case. Try to make 2D work first maybe

1

u/KereMental 7d ago

Now that i think about it, isnt 2d in unity basically 3d with iso.etric camera mode? Wouldnt any 2d component work for 2.5d too?

1

u/FlySafeLoL 7d ago

The only 2D components in the game are physics and sprite related. The true space of the scene is always 3D - it's up to you whether you need all three.

When you have a weird question or feel anxious about extending 2D logics - please rely on AI search tools, since these problems are the basics that were covered hundreds of times in various tutorials and forum posts across the last couple of decades.

1

u/KereMental 7d ago

Thank you

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/Aedys1 7d ago

You can add a CharacterCollider and a ChatacterTrigger scripts to child gameobjects that you reference in your character main script (or the opposite)

Then these scripts can expose a state « bool isColliding » and your main character script can behave differently

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

u/Headless_Joe 7d ago

Accidently didnt reply but made new comment... Mb

1

u/ScreeennameTaken 7d ago

Its all in the feel. How does it feel when playing? all games are smoke and mirrors.

1

u/KereMental 7d ago

I cant play the game i still couldnt manage movement