How do I rotate sprite toward player position in 3D game?

0 favourites
  • 4 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • On gif i use simple sprite with elevated mesh poligons to make this tank tall.

    But i cant solve right rotation in 3D

    anyone?

    media.giphy.com/media/v1.Y2lkPTc5MGI3NjExMjIzMTg5NjEyM2RhZjNiZmRkY2ZkNTUzMTFlYzAyYTkzZDdjYWEyYyZjdD1n/sjnxxdlvk9mhEH1PWC/giphy.mp4

    Tagged:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You're rotating towards an offset to the players X,Y.

    What I think you wanted is to offset the rotation, not the position you're rotating towards.

    Try just 'Rotate towards positon; PlayerCollision.X, PlayerPlayerCollision.Y'

    Then just switch the sprite to the corresponding face of the 3D object.

    Assuming you want the 3DObject to directly face the player at all times.

    Actually in fact the Zombies should already be doing exactly what you're trying to achieve if I understand your intention correctly.

    Have a look at how those are setup in the template.

  • Then just switch the sprite to the corresponding face of the 3D object.

    Assuming you want the 3DObject to directly face the player at all times.

    I know i can use 3D obiect with face or Zombies in example who rotate always at player but this time i try figure out how do this with Sprite, but sprite behave otherwise than 3Dshape :)

  • You're rotating towards an offset to the players X,Y.

    What I think you wanted is to offset the rotation, not the position you're rotating towards.

    Try just 'Rotate towards positon; PlayerCollision.X, PlayerPlayerCollision.Y'

    Then just switch the sprite to the corresponding face of the 3D object.

    Assuming you want the 3DObject to directly face the player at all times.

    Actually in fact the Zombies should already be doing exactly what you're trying to achieve if I understand your intention correctly.

    Have a look at how those are setup in the template.

    Something is wrong with expression

    here is link for example, please fix Construct 3 logo sprite to rotate toward player

    files.fm/u/qt8yb64gh

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)