Yue Posted June 13, 2018 Share Posted June 13, 2018 I have a character with a third person camera, what can I do to make this camera collide with the elements of the stage? Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted June 14, 2018 Share Posted June 14, 2018 You can use raycasting for this. This older video uses C++ but the idea is the same. 1 Quote Link to comment Share on other sites More sharing options...
Yue Posted June 14, 2018 Author Share Posted June 14, 2018 Where can I find Raycasting info in the documentation? Quote Link to comment Share on other sites More sharing options...
Solution AggrorJorn Posted June 14, 2018 Solution Share Posted June 14, 2018 You can do a camera pick (so the pick starts from the camera point of view) https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_Camera_Pick. The pick returns true or false. when pick is true, you can also retrieve information from the pickinfo object. In this object you find the position of the pick, normal etc. https://www.leadwerks.com/learn?page=API-Reference_Object_PickInfo 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.