Author Topic: Getting the triangle of the ground with only an x/z value  (Read 958 times)

Offline AGP

  • quad
  • ******
  • Posts: 1620
    • View Profile
Getting the triangle of the ground with only an x/z value
« 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11985
    • View Profile
    • http://www.jpct.net
Re: Getting the triangle of the ground with only an x/z value
« Reply #1 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.