vParkuu
(_)
#1
So I’m making a placement system and this happens when the rotation reachs 270:
This is the script i’m using:
if Input.KeyCode == Enum.KeyCode.R then
if RealRotation.X == 270 then
RealRotation = Vector3.new(0, RealRotation.Y, RealRotation.Z)
else
RealRotation += Vector3.new(90, 0, 0)
end
TweenService:Create(workspace.BlockPreview, TweenInfo.new(0.25), {Orientation = RealRotation}):Play()
elseif Input.KeyCode == Enum.KeyCode.T then
if RealRotation.Y == 270 then
RealRotation = Vector3.new(RealRotation.X, 0, RealRotation.Z)
else
RealRotation += Vector3.new(0, 90, 0)
end
TweenService:Create(workspace.BlockPreview, TweenInfo.new(0.25), {Orientation = RealRotation}):Play()
end
O3_O2
(o3_o2)
#2
This is because when an orientation axis is 360 or greater, the orientation axis goes to 0.
vParkuu
(_)
#3
its not, the glitch happens when it goes from 180 to 270, not from 270 to 0
O3_O2
(o3_o2)
#4
Try changing this value to 360 instead
vParkuu
(_)
#5
it doesn’t fix it, that if only changes the rotation to 0 when pressing R when the block rotation is at 270, not when changing from 180 to 270
Maybe you should use CFrame, I Guess it better than Orientation.
1 Like
system
(system)
Closed
#7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.