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

Child somewhat-static collision shape #379

Open
ghost opened this issue Mar 26, 2024 · 1 comment
Open

Child somewhat-static collision shape #379

ghost opened this issue Mar 26, 2024 · 1 comment
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Mar 26, 2024

Hi,

I have a humanoid entity in my application and I am modelling the collision for it using an RP3D sphere, and I am happy with how it feels to move around.

However, the humanoid has a shape of around 1m x 1m x 2m - ie it is twice as tall as it is wide. I am modelling it as a 1m x 1m x 1m sphere at ground level, and again I am happy with how this feels, but the issue is that there is no collision on the top half to stop the entity's head going through low ceilings.

So what I really want is a collision object which looks a bit like:
| - a stick
o - the sphere

Where:

The sphere is modelled as normal (because this works well physically for my feeling of movement)
The stick collides against other things, stopping the whole object in its tracks
BUT
The stick has no mass and is always in the same global position compared to the sphere, and does not impact the sphere's physics.

I'm sorry, this is quite difficult to explain. Do I make any sense?

@DanielChappuis
Copy link
Owner

Hello. Sorry for my late answer.

Could you use a CapsuleShape or a SphereShape and a thin CapsuleShape (for the stick)?

I don't really understand what you mean when you say:

The sphere is modelled as normal

Also what exactly do you mean by:

The stick has no mass and is always in the same global position compared to the sphere

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

No branches or pull requests

1 participant