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 DrawCapsule(Wires) #2761

Merged
merged 2 commits into from
Oct 17, 2022
Merged

Add DrawCapsule(Wires) #2761

merged 2 commits into from
Oct 17, 2022

Conversation

sinoftheta
Copy link
Contributor

@sinoftheta sinoftheta commented Oct 16, 2022

These changes add the DrawCapsule() and DrawCapsuleWires() functions. They are heavily based off of the DrawCylinder() and DrawSphere() functions. I came across the need to render capsules based off of two points and a radius when dealing with capsule collision and decided to implement these functions.

I'm not sure if these should actually be the DrawCapsuleEx() functions, and that the DrawCapsule() functions should always draw capsules vertically and instead of taking a second point, just take a "length" parameter, but having them defined by two points and a radius seems simple enough and its what I need for my use case.

I also updated the models_geometric_shapes example and its image.

@raysan5 raysan5 merged commit 7e7939e into raysan5:master Oct 17, 2022
@raysan5
Copy link
Owner

raysan5 commented Oct 17, 2022

@IanBand Thanks for the addition! :)

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