On Player Collision Enter
Physics & collisionsDetailedOnPlayerCollisionEnter
A player collides with this collider.
Happens when a player's capsule collider hits this object's collider (one with Is Trigger off). It fires for any player in the instance, so Whose on the card picks Me, Others or Anyone.
VRChat's docs say it is not called when a player walks into a stationary object. It is meant for moving things, like balls or bullets, that hit a player. To notice a player coming up to a wall or similar, use an area with On Player Trigger Enter.
Colliders on the Walkthrough and Pickup layers don't collide with players, so objects on those layers never count as a hit.
Official docs: Player Collisions (VRChat), Event Nodes (VRChat), Layers (VRChat)
Event values
Values this event has; action settings can use them as targets or values.
| Name | Type |
|---|---|
| That player | Player |
On a card
In Udon
In UdonSharp, this is the method:
public override void OnPlayerCollisionEnter(VRCPlayerApi player)In the same category
- On Trigger Enter (Collider)
- On Trigger Exit (Collider)
- On Player Trigger Stay
- On Player Collision Exit
- On Player Collision Stay
- On Player Particle Collision
- On Controller Collider Hit Player
- On Trigger Stay (Collider)
- On Collision Enter
- On Collision Exit
- On Collision Stay
- On Trigger Enter 2D
- On Trigger Exit 2D
- On Trigger Stay 2D
- On Collision Enter 2D
- On Collision Exit 2D
- On Collision Stay 2D
- On Controller Collider Hit
- On Particle Collision
- On Particle Trigger
- On Joint Break
- On Joint Break 2D
- On Parent Changed
- On Children Changed