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?
🎉 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
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:
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.