Jump to content

Rotate an object 180 deg


Recommended Posts

Blah, sadly that worked for another problem but I have another one...

 

 

I need this...

    local dest = Vector3(inst.components.fishingrod.fisherman.Transform:GetWorldPosition() )    local current = Vector3(troupplefish.Transform:GetWorldPosition() )    local direction = (dest - current):GetNormalized()    local angle = math.acos(direction:Dot(Vector3(1, 0, 0) ) ) / DEGREES    troupplefish.Transform:SetRotation(angle)    troupplefish:FacePoint(dest)

Rotated by 180 more... It seems the  Prefab I have thinks its backwards T_T

 

Fisherman is well the person fishing

troupplefish is the fish that spawns inside the pond

 

Texture wise it faces the left  <--- head   tail --->

 

but using the follow up top, it always puts it tail facing the fisherman and not the head.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...