Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: jayf on June 18, 2014, 06:45:04 AM
-
Hi.
I'm trying to make a projectile that damages enemies, so basically the just standard "bullet". After googeling and following various tutorials, I still can't seem to make it work. However the answer seems to be adding an "On Collision" transition to trigger the rest of the actions. But it still can't seem to work. I've attached the FSM setup. The "Hit Target" Action contains stuff like "Send Event" and "Get Collision Info".
-
Does the bullet and the thing it hits both have colliders?
-
Enemy has a collider, the bullet doesn't. If I add a collider to the bullet, it seems to disappear, or it can't seem to spawn for some odd reason. Without a collider, it works fine with an Add Torque action.
-
The bullet must have a collider. It probably disappears because it spawns inside a collider such as the gun or the player. Can you confirm?
-
Yes! That was the problem. They actually spawned inside the gun and got destroyed before actually leaving it, so I made them spawn outside instead and now their hits register with the enemy since they now have a collider. Thanks for the help! :)