Jump to content

hom.png

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About hom.png

  • Rank
    Newbie
  1. I don't think this is the right thing because I want it to rotate towards the mouse yet this will rotate it constantly however, there is some good use in this as if I make a rotVec for the y coordinates as well and do the whole Rot=ATan(rotVecy/rotVecx) thing and then do self.entity:SetRotation(0,self.entity:GetRotation().y+(Rot*lookSpeedMultiplier),0) and then run the code you can see that the moment you cross where x=0 the entity starts rotating the other way and I assume this is the base of the issue.
  2. so I try to get the center of the screen and find the mouse position and then find the difference then using ATan(change in y/ change in x) to find the angle the object must rotate to and set the angle to that, the only issue is when the mouse x is <= 0 the object flips (so lets say the right side of the object was facing the mouse it then becomes the left side) I assume this issue is to do with the fact that ATan(change in y/change in x)=ATan(-change in y/-change in x) but here is my code:
×
×
  • Create New...