playMaker

Author Topic: Camera trigger action  (Read 2473 times)

gecko

  • Junior Playmaker
  • **
  • Posts: 52
Camera trigger action
« on: June 09, 2013, 02:01:18 PM »
I need to set up action that acts as a trigger when the main camera enters a box collider. I've tried a Trigger Enter event, but since the camera isn't a rigid body, that doesn't work. Is there a way to do this?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Camera trigger action
« Reply #1 on: June 10, 2013, 01:24:48 AM »
Hi,

 you can make any GameObject a physics object by adding a physics component. Including camers, lights, aynthing really.

what i would recommand tho is creating a hierarchy:

Camera Platform: --> that's your trigger
  - Camera: --> that's your main camera attached to the "Camera Platform"


bye,

 Jean

bye,

 Jean

gecko

  • Junior Playmaker
  • **
  • Posts: 52
Re: Camera trigger action
« Reply #2 on: June 11, 2013, 09:18:54 PM »
Hi,
 
It's likely a physics set up issue, one of the two collider getting in contact should have a rigidbody component, can you double check this is the case?

bye,

 Jean
« Last Edit: June 17, 2013, 01:10:02 AM by jeanfabre »

gecko

  • Junior Playmaker
  • **
  • Posts: 52
Re: Camera trigger action
« Reply #3 on: June 17, 2013, 10:41:38 AM »
I had put a rigidbody on the camera parent and that didn't work....but now I've added a cube inside that parent, next to the camera, and with a rigidbody on the cube, it works. Weird, but at least it works! thanks for the help.