Is there a way to make Enemy head tracking taking place inside of a service in AI behaviour tree?

I am currently making a combat game with a big mech using laser attacks, however I want to turn head tracking on and off relative to when the laser attack mode is activated.

I thought about using a service but it doesn’t move smoothly at all like it does if I do it from the enemy blueprint. The way I’m doing head tracking is a bit irregular but it works for what I want it to do, here’s the code I have done below:

I am using a poseable head mesh and the head mesh rotates towards the character on event tick and i thought i could transfer this code into a service using ‘Event Receive Tick AI’

I also thought about using a blueprint interface to call the function inside of the enemy blueprint on the service but that doesnt seem right either.

Any advice or tips on how I could do this? I hope it all makes sense- Im fairly new to blueprinting still!

I solved it- Head tracking within a service in behaviour tree inside the enemy is possible by using ‘Event recieve tick AI’ and called a custom event inside of the enemy bp, i was just casting to the wrong place.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.