On Controller Collider Hit Player
Physics & collisionsDetailedOnControllerColliderHitPlayer
This object's CharacterController hits a player while moving.
Happens when this object's CharacterController hits a player while moving with Move. VRChat adds it next to Unity's OnControllerColliderHit; for hits on anything other than a player, use On Controller Collider Hit.
The CharacterController on this object does the hitting, and the player is what gets hit. It is not a way to notice a player's own body running into something; for that, use an area with On Player Trigger Enter.
The hit holds the player who was hit. VRChat's example moves the CharacterController forward with Move on every Update and shows the hit player's name in a text. Calling Move is up to a script or Call Udon API.
Official docs: Detect Controller Collide (VRChat), Player Collisions (VRChat)
Event values
Values this event has; action settings can use them as targets or values.
| Name | Type |
|---|---|
| The hit | ControllerColliderPlayerHit |
On a card
In Udon
In UdonSharp, this is the method:
public override void OnControllerColliderHitPlayer(ControllerColliderPlayerHit hit)In the same category
- On Player Collision Enter
- 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 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