www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: AGP on June 17, 2012, 08:28:28 am

Title: Getting the triangle of the ground with only an x/z value
Post by: AGP on June 17, 2012, 08:28:28 am
I had a quick look at the PolygonManager class, but it seems to require the polygon's ID, which I don't have. So how do I get a specific polygon from the ground directly under my model? Thanks in advance.
Title: Re: Getting the triangle of the ground with only an x/z value
Post by: EgonOlsen on June 17, 2012, 11:00:15 am
By triggering a collision. For example using calcMinDistance or similar. You can get the polygon id from the CollisionEvent if your listener implementation returns that you want these ids.