What I need
So I have a script and I need to make the a part point in a certain direction.
But the normal lookvector is not what I what so I need to rotate it by 90 degrees.
So how would I do that?
I already have the lookvector BTW
Thanks
~Froyo~
Use RightVector
for the right, or -RightVector
for the left.
Could you demonstrate on how I would do this? I cant figure it out.
Whereever you are using CFrame.LookVector
in your code use CFrame.RightVector
The RightVector is a UnitVector that point in the “Right” direction of the CFrame
Well I dont really use lookVector. Well that property.
As you can see my code.
local lookAt = CFrame.new(po1,hitPo)
moveArm.CFrame = lookAt
Sorry if this is bothering!
Could you elaborate on what you are trying to achieve? I don’t have much context with that code.
I am trying to make a part or moveArm , to point at a certain position.
Only problem is. That it yes points towards the position, but cause of the mesh it faces a different direction.
What I need is to then rotate it like 90 degrees.
So it faces the right direction.
Thats what I need!
So what you can do is just append to the CFrame
local lookAt = CFrame.new(po1,hitPo)
moveArm.CFrame = lookAt * CFrame.Angles(0,math.rad(90),0) -- add whichever angle you want, this one adds 90 degrees yaw
1 Like
I dont know why I didnt think about this.
I forgot I can just rotate it with CFrame.Angles!
Thanks!
1 Like
system
(system)
Closed
May 16, 2023, 12:03am
#10
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.