Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add offset property to BoxCollider and SphereCollider components #74

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bub-bl
Copy link
Contributor

@bub-bl bub-bl commented Nov 19, 2023

No description provided.

@garrynewman
Copy link
Member

The GameObject's transform is the offset

@bub-bl
Copy link
Contributor Author

bub-bl commented Nov 19, 2023

I didn't understand what you mean

Without this PR, the only way to set the collider position is to create a child object at the root and add the Collider Box component on it, then set the position of this child object to place the collider correctly. I dont know any another way to do this without an Offset property

2023-11-19.15-48-09.mp4

@garrynewman
Copy link
Member

Add the collider as a child GameObject and move the GameObject

@bub-bl
Copy link
Contributor Author

bub-bl commented Nov 19, 2023

The current way looks a bit like a workaround

It might be better to directly add the Offset property to the Collider to move the position of the box instead of creating a child GameObject and adding a Collider to it. It's more understandable for beginners

@garrynewman
Copy link
Member

What if you want to rotate it too? Should we also have a rotation offset?

@bub-bl
Copy link
Contributor Author

bub-bl commented Nov 24, 2023

This is a suggestion, if you dont want merge this PR, dont do this

But yeah, add a rotation offset property

@garrynewman
Copy link
Member

What if you want each collider to have its own tags, shall we add a tag property too?

@bub-bl
Copy link
Contributor Author

bub-bl commented Nov 25, 2023

So, maybe create a default component inside of the hierarchy context menu to create a collider directly ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants