Rotate an object in the direction tagpoint

Rotate an object in the direction tagpoint? How to do it in FG?

I guess you have to ask questions on cryengine. Amazongamedev - useless.

Hi @Vortex333

Here’s an example of how to make an entity rotate to face a tag point. If you want to not rotate instantly let me know and I’ll update the sample - it’s a bit more complicated.

Here’s the XML if you want to copy and paste this into Flowgraph - be sure to re-assign the entities before running.

 <Graph Description="" Group="">
<Nodes>
<Node Id="1" Class="Game:Start" pos="-50,30,0" flags="1">
<Inputs InGame="1" InEditor="1"/>
</Node>
<Node Id="5" Class="Entity:EntityFaceAt" pos="390,40,0" flags="1" EntityGUID="{F3A2B7FB-BC6C-4324-A978-0E8D10047CCD}" EntityGUID_64="4324BC6CF3A2B7FB">
<Inputs pos="0,0,0" FwdDir="0" ReferenceVec="0,0,1"/>
</Node>
<Node Id="8" Class="Entity:EntityId" pos="180,40,0" flags="1" EntityGUID="{330537E0-FB0C-40B1-82B0-619D40E532A8}" EntityGUID_64="40B1FB0C330537E0">
<Inputs />
</Node>
<Node Id="9" Class="Time:Time" pos="180,130,0" flags="1">
<Inputs paused="0"/>
</Node>
<Node Id="10" Class="Movement:MoveEntityTo" pos="170,-180,0" flags="1" EntityGUID="{330537E0-FB0C-40B1-82B0-619D40E532A8}" EntityGUID_64="40B1FB0C330537E0">
<Inputs Destination="550,505,40" DynamicDestination="1" ValueType="0" Value="1" EaseInDistance="0" EaseOutDistance="1" CoordSys="0"/>
</Node>
<Node Id="32" Name="Get tagpoint Entity Id" Class="_comment" pos="174.57153,15.180133,0" flags="1"/>
<Node Id="33" Name="Move the tag point" Class="_comment" pos="170,-210,0" flags="1"/>
<Node Id="34" Name="Update continually" Class="_comment" pos="180,100,0" flags="1"/>
</Nodes>
<Edges>
<Edge nodeIn="8" nodeOut="1" portIn="Activate" portOut="output" enabled="1"/>
<Edge nodeIn="10" nodeOut="1" portIn="Start" portOut="output" enabled="1"/>
<Edge nodeIn="5" nodeOut="8" portIn="target" portOut="Id" enabled="1"/>
<Edge nodeIn="5" nodeOut="9" portIn="Activate" portOut="tick" enabled="1"/>
</Edges>
</Graph>

Hi @Vortex333

Sorry for the delay - I’m preparing a sample for you.

I am still having issue with this setup as far as rotation goes. Mine is modified for the assets I’m using (a sliced CDF and tag points) and my CDF doesn’t rotate to face the tag point. My CDF is a component entity, not a legacy entity. Is that the culprit?

Hi @Taylor, yes, the component entity is the issue here, well, actually Flow Graph is the issue here. We have deprecated Flow Graph and will be releasing the new Script Canvas (Preview) system in 1.11 with should give you much more control and flexibility with component entities. We think you will really like the new system.

great news, thank you dear binky , I published your comments in the my channel (news) in the telegram :

https://t.me/BukanGames

Hi @Taylor,

Have you had a chance to test out the new ScriptCanvas system yet? Are you still having problems getting this to work?

Looking through the Script Canvas nodes, I believe the Look At math function will get me where I want to go. Thanks!