playMaker

Author Topic: Global Transition - Collision Enter  (Read 3789 times)

pandigital

  • Playmaker Newbie
  • *
  • Posts: 23
Global Transition - Collision Enter
« on: October 06, 2011, 08:34:01 AM »
Hi
Could someone please explain how the global system events / transitions work.
For example - I have two cubes both with box colliders and rigidbodies (IsKinematic)
One cube (the player) has an fsm which lets you move it around and I'm now trying the global transition CollisionEnter to detect when it hits the other cube.
At the moment nothing happens.
Should this global transition be a quick way of detecting a collision and jumping to this transition?

TIA

pandigital

  • Playmaker Newbie
  • *
  • Posts: 23
Re: Global Transition - Collision Enter
« Reply #1 on: October 06, 2011, 09:29:05 AM »
I can trigger a CollisionEnter by disabling isKinematic on the static cube, but then have to deal with physics, which I don't want. So then I freeze all the constraints on the static object. Is this the best way to go?
I think I may be better of with a RayCast...
« Last Edit: October 06, 2011, 09:33:51 AM by pandigital »

pandigital

  • Playmaker Newbie
  • *
  • Posts: 23
Re: Global Transition - Collision Enter
« Reply #2 on: October 06, 2011, 11:11:23 AM »
Will the Wait action override the Global Transition being called on CollisionEnter ?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Global Transition - Collision Enter
« Reply #3 on: November 05, 2011, 02:49:07 PM »
Sorry, missed this thread before. Sounds like you get the collision events working...?

The Wait action just delays the FINISH system event sent when all actions on a state have finished. E.g., a Wait of 2 seconds guarantees the state will not finish for at least 2 seconds, but if other actions are still running the FINISH event will not be sent until they're all finished.

If you want to send an event after a specific time, use Send Event with a Delay.