Announcement

Collapse
No announcement yet.

Find Look at Rotation not functioning as expected

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Find Look at Rotation not functioning as expected

    Hello, I am trying to make an Archer AI. In order for this archer AI to work I have four blueprints in play. The character blueprint of the ArcherAI, The FiringPosition of the AI (This is an actor that when the archer overlaps with it shoots an arrow at the player position), the AIArrow Blueprint itself that has a projectile component attached, and the Player Collision Actor Blueprint that simply takes hit events from the arrows and does damage to the player. What I am trying to achieve is to shoot the arrow at the player's position. I am currently trying to use find look at rotation to get the location of the firing position (Which is the actor that spawns the archers actual arrow projectile) By setting the start to be the position of the AIArrow and the target to be the location of the PlayerCollision Actor and then setting the rotation of the AIArrow I can manage to get it pointing in the direction I want it to look at, but when I Set the velocity to the forward vector of the find look at rotation and then set the initial speed of the projectile it just shoots in a consistent but very strange direction. The cube mesh is to just see where the front of the arrow is at long distances.

    Update:
    So i managed to get this working and figure out why it wasn't working before. I can manage to get the rotation correct if I use a scene component as the root of the static mesh. But the initial speed doesn't shoot the arrow. However when I remove the root scene component and use the static mesh as the root object. The physics works but not the rotation. I want to set the rotation and velocity.
    Simplified version:
    Use Scene Component for root instead of Mesh = Rotation Works, but Projectile Movement Doesn't (With Velocity Vector or Set Speed Float)
    Using Static Mesh root instead of Scene Component root = Physics work but rotation doesn't.
Working...
X