Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: DJ7705 on May 17, 2018, 09:53:22 PM
-
Hi I'm a Newbie to Playmaker but I know my way around Unity pretty well.
I'm trying to make a Playmaker script that causes a specific Turret in my scene to follow & track the mouse within a certain radius and to fire. But I'm having nothing but issues! I've tried looking online for a tutorial that could explain well and/or show how to accomplish that but haven't found any relevant tutorials towards this end. Can someone please either provide some sage-like advice or some links where I can find the info I need to accomplish this? Thank you in advance
-
Its hard to suggest without knowing exactly where you are.
However, I would start with using the "Smooth Look At Direction" action, as this will allow you to look at a vector or game object. I think it accepts a min/max value. So if over a value, you can stop moving it.
The vector you want to use is your mouse position. You may need to learn how to get screen to world space for this. (Mouse lives in screen space, but your gameobject lives in world space). Tutorial here:
-
Thank you so much tcmeric, I'll check that tutorial out hopefully it will help me Accomplish my goals!
-
Hi,
yes, try to study existing actions and work from there.
then make sure you tackle one issue at a time and post here or new threads ( better)
Bye,
Jean