Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: coxy17 on January 04, 2016, 08:01:37 AM
-
Hi
I have a game which uses an object which is used in different positions in world space. I created a object and want it to track my character and remain vertical whilst doing this action. Ive used the LookAt script and works ok when my objects axis matches the world space axis on XYZ.
However, all i have done is made a copy of the object and rotated it to face upside down but i want it to remain upside down and track the player. But when i go an run the game it instantly flips the object back facing up right and hen tracks he player. Why is this? I thought the principal would work for any rotated object.
Hope im making sense. Ive attached a diagram to explain further.
Nick
-
You can try using an up vector to always have it point up correctly- you can also try the smooth look at action which has a couple different options
-
Hi
Ok i have taken a look and i'm finding it hard to work out. Ca i get the objects Local Vector? rather than world vector? as ive noticed that the object keeps flipping back as it doesn't realise that my object is upside down.
To summarise i'm after an upside down player looking at an object but remains up based on its local Y axis.
I'm thinking this wont be possible
Nick
-
Have you tried to set the "Up Vector" on the look at action to 0,-1,0 so Y faces "-1" instead of "1"? All so I'm not sure if "keep vertical" prevents that behaviour to begin with.
-
That worked great. The minus one (-1)
Cheers!