Announcement

Collapse
No announcement yet.

How to rotate a character in a particular direction?

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

  • replied
    awesome video but i have a question, i am trying to get the enemy to rotate towards the player which works but because the Player is rotated 90 degrees originally the enemy ends up looking at me(its a side scroller) how can i fix this? thanks
    see: https://bluestacks.vip/ , https://kodi.software/ & https://luckypatcher.pro/

    Leave a comment:


  • replied
    Are you using cpp or blueprints?

    If you get a reference to your character, it has a SetActorRotation function. That will rotate everything in the character.

    Child components should also rotate with their parent if you have attachments set up properly. In your details panel check that your rotation is set to relative, and if using cpp make sure you call SetupAttachment() for your components.

    Leave a comment:


  • How to rotate a character in a particular direction?

    This is an incredibly noobish question but for the life of me I haven't been able to do it. I want to rotate my character in a particular direction, to face another object. I've tried a gazillion things but the rotation only applies to the capsule component or mesh or whatever component is referenced. If I apply it on the capsule component, the mesh doesnt rotate even if it's a child of the capsule component. I'm also not sure whether my logic to calculate the actual angle by which I have to rotate it is correct. Forgive the noob question and please, I'd appreciate it greatly if someone could help me out with this.
Working...
X