Jump to content
  • Advertisement

Recommended Posts

How can you cast a 3D object against the environment? In Unity, you can do Spherecasting, Capsulecasting and Box casting, but I want to cast a cylinder. How does one implement shapecasting?

Share this post


Link to post
Share on other sites
Advertisement

Are you asking specifically how to do this in Unity? Or in general? If you mean in Unity, I'd suggest searching the internet for e.g. 'unity cylinder collider' (I just did and found some discussion of the topic). If you mean in general, that's obviously a more complicated question.

Share this post


Link to post
Share on other sites

The best solution would be a method called Conservative Advancement. The question is whether you want to consider rotation or only linear movement. Erin Catto extended the algorithm and gave a good presentation here:

http://box2d.org/files/GDC2013/ErinCatto_GDC2013.zip

This is a non-trivial problem. If you google the term you will find a bunch of resources.

 

Share this post


Link to post
Share on other sites
21 hours ago, Dirk Gregorius said:

The best solution would be a method called Conservative Advancement. The question is whether you want to consider rotation or only linear movement. Erin Catto extended the algorithm and gave a good presentation here:

http://box2d.org/files/GDC2013/ErinCatto_GDC2013.zip

This is a non-trivial problem. If you google the term you will find a bunch of resources.

 

Thanks Dirk! Unfortunately, Google has been uncooperative with me. Every time I search for "Shapecast" it would return a list of the movie The Circle's cast members.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!