Hi,
I’m working on a game project and what I’m trying to do is make a system where a sentry rotates left or right following my player. I’ve tried using the Find Look At Rotation node, the thing is I’m looking for a speed limit to this rotation and the Find Look At Rotation node seems to be instant. I’m a newbie on programming so every help is more than welcome to me.
For now the logic that i want to achieve with this system is pretty much this:
- Whenever the player is within collision my actor will look for the player position on the X axis and if it’s positive it will rotate right, if it’s negative it will rotate left.
- Whenever the player is within collision my actor will look for the player position on the Y axis, if it’s higher than a 70º angle upwards it will stop following vertically until it comes back down (pretty much putting a cap on how far up it can look for the player.
The problem is I don’t know how to work out this location to rotation relativity, My initial thoughts were to get the player character relative x location and subtract it from my sentry relative x location, but it didn’t work since the relative location for the player character is NOT relative to my sentry location… at least that’s what I think. Please help guys!
Thanks! :3