Wiki

Case Status
Log In

Wiki

 
Home ยป Add-ons»Game analytics»Game Analytics Breakout exampl…»Target / target
Index
Navigation
Community Wiki

Target / target

Game Object Setup

This target GameObject is a RigidBody with Physics constraints so that it can only turn around it's z axis. When the ball collides with it, it will react to the collision with eratic rotations.

Fsm Description

START

Targets are set to yellow by default and rotates freely under physics by adding torque to it.

COLLISION ENTER

When something collides with this target, it means the user scored, so it broadcasts a "ADD SCORE" global event for the system to record this score. It passes to this event the name of the GameObject that hit ( the ball), and also the position of this target. This will be used by GameAnalytics. to get access to these information, it used the Collision Info. "COLLISION ENTER" is a System event that PlayMaker forwards to the Fsm, it's been fired by the physics engine itself.

It also turns the cube to green for half a seconds and then switch it back to yellow by returning to the same flow as the START, to it ends up in the "rotate" state again.

Fsm Content

PlayMaker Actions


Last modified on 12/3/2013 3:11 AM by User.

  • RSS Feed