Raycasting kinematic/trigger rigidbodies #1430
-
|
Is it possible to use Simulation.Raycast and make it hit rigidbodies which have either IsKinematic, IsTrigger or both true? I'm trying to make a raycast-based shot which changes how it looks if it hits certain triggers, but it simply ignores them and only hits non-trigger, non-kinematic rigidbodies; I might be doing something wrong but I'm out of ideas on how I can make it work. I'd greatly appreciate any help/suggestion on this matter. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
If you are running from master directly instead of the launcher you can call physics tests and set the hitTriggers parameter to true Simulation.RaycastPenetrating(from, to, hitCollection, hitTriggers: true); |
Beta Was this translation helpful? Give feedback.
If you are running from master directly instead of the launcher you can call physics tests and set the hitTriggers parameter to true
ex: