playMaker

Author Topic: Get Collision Info Not Working[SOLVED]  (Read 2584 times)

MarkD

  • Full Member
  • ***
  • Posts: 113
Get Collision Info Not Working[SOLVED]
« on: April 24, 2014, 04:13:23 PM »
Hey everyone,

In my project, I have an object firing projectiles.  When it hits an object I want to store what that object is so that I can do a compare so that I can decide to do damage to it or not.

I've got three objects in my prototype:
  • The Shooter
    The Receiver
    The Projectile

However, when the projectile collides with the receiver object, I can see that in the projectile FSM that the game object variable (myTarget) isn't being set.



I'm guessing that I'm not configuring something correctly with my objects rather than there being something incorrect in my FSM's, but I'll be damned if I can figure out what it is.

I have both objects set up with colliders and rigid body components.  Here's what the inspector panel looks like on both of them.

The Projectile:



The Receiving "Hit" Object:


Note:  I can clearly see the projectiles impacting the Receiver Object, but for some reason Get Collision Info is not capturing the Game Object as a variable.

Any ideas anyone?
« Last Edit: April 25, 2014, 08:26:22 AM by jeanfabre »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Get Collision Info Not Working
« Reply #1 on: April 24, 2014, 05:01:22 PM »
You're firing FINISHED through those states. You must have a Collision Event in the Add Force state that is also firing FINISHED when there is a collision. Is that the case?

You can right click that "Collision" state and Add Breakpoint to pause the game whenever it enters that state. That would at least confirm the flow is working.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Get Collision Info Not Working
« Reply #2 on: April 24, 2014, 05:11:07 PM »
Seconded to collision event on Add force state. So it knows that when it collides it goes to that collision state. You can also right click on the collision state and select with a global event on collision.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

MarkD

  • Full Member
  • ***
  • Posts: 113
Re: Get Collision Info Not Working
« Reply #3 on: April 24, 2014, 09:53:45 PM »
That was it!  I needed a Collision event!  Thanks guys!