Custom Vehicle Controller
  • Custom Vehicle Controller
  • Guides
    • Workflow
      • Quick Setup
      • Creating New Parts
      • Modifying Parts
      • Creating Vehicle Parts Presets
      • Customizable Sets and Runtime Parts Change
      • Engine Performance Customization
      • Exposing Current Car Stats
    • API
      • CustomVehicleController
      • VehicleEngineSoundManager
      • RaceManager
      • RacerProgress
      • RaceSpawner
      • CollisionHandler
    • Vehicle Controller Input Provider
      • Input System Example
      • Mobile Input
    • Tips, Warnings and Requiremens
      • Work With Editor
      • Vehicle Set Up
    • AI Setup
      • AI Racer Creation
      • AI Racer Setup
      • AI Chaser Setup
      • Race Creation
      • Race Configuration
      • Race Information
    • Vehicle Damage System
      • Vehicle Damage Controller
      • Collision Area Partitioner
      • Part Damage Handler
      • Vehicle Attachments Aligner
      • Collision Handler
    • Additional Settings
      • Custom Vehicle Controller
      • Car Visuals Essentials
    • Package Settings
      • Assets Save Location
      • Project-Wide Surface Settings
    • Extra
      • Adding Visual Effects
        • Individual Effect Set Up
      • Adding Sound Effects
        • Adding Engine Sound
        • Adding Extra Sound Effects
  • Converting To Other Render Pipelines
    • Convert To Built-in RenderPipeline
    • Convert To HDRP RenderPipeline
Powered by GitBook
On this page
  1. Guides
  2. API

CollisionHandler

OnCollisionImpact

Property
Description

Side

Enum of the Top/Bottom/Left/Right/Front/Rear value

CollisionsCount

The amount of contact points

Point

The position in world space

Normal

The normal of the collision

RelativeVelocity

Relative velocity

CollisionMagnitude

The length (speed) on the relative velocity

DotToMyVelocity

Dot product between your rigidbody's normalized velocity and collision normal. Can be used to identify the "strength" of the collision.

DistanceToPreviousCollisionPoint

Distance to the previous contact point from this collision. OnCollisionImpact sends event for every contact point from a collision.

WeightRatio

Ratio between the other and your rigidbody mass.

CollisionStayInfo

Property
Description

CollisionSide

Enum of the Top/Bottom/Left/Right/Front/Rear value

Position

The position in world space

RelativeMagnitude

The length (speed) on the relative velocity

PreviousRaceSpawnerNextVehicle Controller Input Provider

Last updated 9 months ago