🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How to Shapecast

Started by
5 comments, last by Dirk Gregorius 4 years, 9 months ago

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?

Aiming high is easier than flying high.

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.

In general. In Unity there is spherecast but I want to use a cylinder. Example on what I want to do:

 

Aiming high is easier than flying high.

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.

 

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.

Aiming high is easier than flying high.

No, not shape cast. Google for "Conservative Advancement" :)

This topic is closed to new replies.

Advertisement