Jump to content

Can someone help convert this setangle code to use translateto?


trepleen

Recommended Posts

Posted

This code makes the follower face her back to the player.

 

;katreena faces away from the player
float zoffset = katreenadarkmoore.getheadingangle(game.getplayer())
katreenadarkmoore.setangle(katreenadarkmoore.getanglex(), katreenadarkmoore.getangley(), katreenadarkmoore.getanglez() + (zoffset - 180))

 

The problem is that the follower performs the turn instantly, so it seems unnatural.

 

Does anyone know how to convert the above code to use translateto instead of setangle? Translateto should make the follower turn her back towards the player naturally, instead of instantly.

Posted

a.TranslateTo(a.GetPositionX(), a.GetPositionY(), a.GetPositionZ(), a.GetAngleX(), a.GetAngleY(), Game.GetPlayer().GetAngleZ() + 180.0, 10.0, 0.0)

 

Okay so it's not just me then, translateto doesn't seem to like tight spaces. I appreciate this btw.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...