asnnnnnf Posted September 1, 2016 Share Posted September 1, 2016 I am using opengl with java light weight game library and I am trying to figure out how Kevin Forbes programmed the selection of objects in the game. I can currently ray cast out of my 3d perspective camera, and have the ray detect if it collided with a box the size of the object (say a tree), but in Don't Starve, it can detect if the mouse collided with the tree outline and it ignores the transparent parts of the .png tree. How did Kevin program this? I am very impressed by it, and just can't figure it out! I am trying to implement this in code in my own game. Thank you very much for responses! Link to comment https://forums.kleientertainment.com/forums/topic/69918-programming-question/ Share on other sites More sharing options...
asnnnnnf Posted September 4, 2016 Author Share Posted September 4, 2016 I figured it out Link to comment https://forums.kleientertainment.com/forums/topic/69918-programming-question/#findComment-810544 Share on other sites More sharing options...
Arkathorn Posted September 20, 2016 Share Posted September 20, 2016 If you figure out the answer to a question posed on the forums, please post it so that others may learn. I assume you calculated the impacted pixel of the texture, and then referenced it with a byte array? Link to comment https://forums.kleientertainment.com/forums/topic/69918-programming-question/#findComment-815861 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now