playMaker

Author Topic: Get the Vertex on an Object That is Closest to a Location?  (Read 1949 times)

westingtyler

  • Sr. Member
  • ****
  • Posts: 277
    • My Video Game Projects Web Site
Get the Vertex on an Object That is Closest to a Location?
« on: June 16, 2017, 01:08:27 PM »
This would be useful for having objects float in wavy water (which uses a vertex displacement shader) or for putting bullet holes actually on objects rather than on their box colliders.

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: Get the Vertex on an Object That is Closest to a Location?
« Reply #1 on: June 17, 2017, 05:17:03 PM »
I wonder if it'd be necessary to loop through all the vertices for this? That sounds like it could get expensive pretty quickly