Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Krauser1129 on September 21, 2020, 02:57:13 PM
-
I raycast forward and store the hit object as TargetOBJ.
I then use Game Object Compare Tag to the tag Enewmy. If true, go to next state.
There's nothing there but it keeps going to the next state like it picked up the enemy. I made a new object with the same stuff above but it doesn't pick up anything. I moved the turret like 100feet off the ground and it still keeps going to the next event. I redid the action and this specific turret still keeps giving off a false positive. I checked all the components, nothing is tagged as Enemy. Any ideas?
-
Hi.
Can you show an image of your action/state
-
I was able to sorta confirm there's not an enemy tag there so not sure what's going on.
-
Hi.
When you go back to the raycast state you probably need to clear the target object.
as the object will still be in the variable
But you should use layers on the raycast so it sees only the layer that you select (enemies/walls for example)
-
layer masks! You're a genius, thank you!!!