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

Improved ray shape (2D and 3D) by addiing the possibility to act as r… #16530

Merged
merged 1 commit into from
Feb 19, 2018

Conversation

AndreaCatania
Copy link
Contributor

…egular shape

As you know the ray_shape is special shape that should be used only for rigidbody in character mode. (and this is a bit restricting IMO)

With this PR we will be able to tell the engine to handle the special ray_shape as a regular shape in order to allow us to use it anywhere.

In order to active it I've added the parameter slips_on_slope in the ray_shape that when true allow the shape to behave as all other shapes (basially it will return the correct normal) [By default this parameter is set to false]

I've i'mplemented it on 2D, 3D godot physics and 3D Bullet physics

@AndreaCatania
Copy link
Contributor Author

@n-pigeon Probably this may interest you

@leiget
Copy link

leiget commented Feb 10, 2018

I'm just curious as to how this is intended to be used. What's the benefit of having it be regular shape?

@AndreaCatania
Copy link
Contributor Author

AndreaCatania commented Feb 10, 2018

In this moment the ray shape is an trick that exists only to facilitate the creation of rigidbody in character mode.

By using it the normal points always in the direction of Ray shape and the character can walk uphill or stay still on a slope without problems.

But if you need to use it in a more realistic scene you can't since the friction response and other forces are not properly handled

What's the benefit of having it be regular shape?

The benefit is the fact that it can be used for general purpose things like all other shapes, and what you can do with it (now) is just limited by your fantasy.

@ghost ghost added this to the 3.1 milestone Feb 11, 2018
@akien-mga akien-mga merged commit b2aeb02 into godotengine:master Feb 19, 2018
@AndreaCatania AndreaCatania deleted the rays branch February 20, 2018 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants