Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: curb47 on February 25, 2021, 03:18:01 AM

Title: Smooth Look At 2D
Post by: curb47 on February 25, 2021, 03:18:01 AM
Hiya,

Im the process of fine tuning a few things on my Titan enemy, and I've noticed something that is causing a timing problem.

My game is 2.5D, so all the objects and world are in 3D space, but the gameplay action happens on one plain in Z-Space, ie - nothing moves in Z-Space, it's all on the X and Y. I've used the Smooth Look At 2D action on the Titan enemy so it turns and faces the player spaceship when it is attacked, and when the Finish Tolerance is reached, it sends the event for the Titan to chase the player and start shooting it.

I previously used the non-2D version of Smooth Look At, but I don't like the way it flips the whole Titan around, whereas the 2D version rotates it nicely.

The problem I'm having is the Finish Tolerance is being ignored and the Event is triggering immediately, rather than waiting for the Titan to be facing the player spaceship.

(https://i.postimg.cc/prqR9t4D/lookAt.png)

Is there something wrong with using Smooth Look At 2D on an object that is in 3D space, with a Rigidbody, and not a Rigidbody 2D?