string GetPhysicsActorGroup(string physicsActorName)
This function receives the name of physics actor and returns its type as string.
Specifies the name of the physics actor belonging to the prefab instance.
This function returns the type of physics actor as one of the following string values:
Kinematic is a dynamic actor that can ignore some rules of physics, and its rotation and translation is controlled by prefab instance.
A dynamic actor has its position and rotation updated by the physics simulation and controls the translation and rotation of its prefab instance.
Triggers allow colliders to perform overlap tests.
Static actor is immovable by the physics simulation.
Default physics ground plane.
function OnTriggerEnter(otherActorName) if GetPhysicsActorGroup(otherActorName) == "KINEMATIC" then PrintConsole("\nKinematic Actor") elseif GetPhysicsActorGroup(otherActorName) == "DYNAMIC" then PrintConsole("\nDynamic Actor") end end function OnTriggerStay(otherActorName) end function OnTriggerExit(otherActorName) end
Assume that this script is attached to a trigger. In this case, whenever a prefab instance that has a kinematic actor is entered into this trigger, a message titled “Kinematic Actor” will be displayed on the console. Otherwise, if the prefab instance that has a dynamic actor is entered into this trigger, a message titled “Dynamic Actor” will be displayed in the console.GetPhysicsActorGroup