- Home /
This question was
closed Jun 19, 2017 at 12:50 PM by
a67_nk for the following reason:
Other
I want to write a code where i can detect collision with trigger collider in FixedUpate function(C# source)
i am trying to make a game I which if the player hits a trigger collider his running speed increases, I am a newbie to unity so plz try simple explanation. unity ver. 5.5
Comment
Answer by Brogan89 · Jun 17, 2017 at 12:18 PM
trigger detection is done in OnTriggerEnter/OnTriggerExit functions, not inside fixedupdate or update or lateupdate . see https://docs.unity3d.com/ScriptReference/Collider.OnTriggerEnter.html
Follow this Question
Related Questions
Multiple triggers on one object still a no? 1 Answer
c# trigger collider makes character controller misbehave. 1 Answer
C#: Climb ledge while inside collider 1 Answer
How to Destroy items in Match 3. 2 Answers
Problems with OnTrigger 1 Answer