[Feature Request] Include vertex hit info in input info. #4577
Replies: 3 comments 5 replies
-
What are RaycastHit.triangleIndex and RaycastHit.barycentricCoordinate? RaycastHit.triangleIndex: Represents the index of the triangle that was hit on the mesh collider of the object. |
Beta Was this translation helpful? Give feedback.
-
Isn't it can be retrieved from local position? |
Beta Was this translation helpful? Give feedback.
-
I think I have some good news for you! When I implemented the NetId-relative transform replication, |
Beta Was this translation helpful? Give feedback.
-
I'm proposing adding
RaycastHit.triangleIndex
andRaycastHit.barycentricCoordinate
to the replicated data in InputInfo when you hit or shoot an object other than a player/npc like placeables, objects, resources, vehicles, etc.This will allow us to add special behavior when a specific part of an object is shot or punched, along with the already existing
colliderTransform
. It would be trivial for us to get any vertex data from the mesh collider with this info, like UVs, vertex colors, etc.Example usages:
It would be fairly easy and cheap to add and would allow plugins to do a lot of cool things with dynamic hit actions.
Beta Was this translation helpful? Give feedback.
All reactions