-
Notifications
You must be signed in to change notification settings - Fork 0
Added 3rd Person Camera #3
base: dev/0.1.0
Are you sure you want to change the base?
Conversation
-- Generates the goalCFrame for tracking taget | ||
local goalCFrame = CFrame.new(target.Position) -- The position of the target | ||
* CFrame.Angles( -- Rotated by the target | ||
math.rad(target.Orientation.X) * cameraShake, -- Camera shake while moving |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this camera shake work? It looks like you're applying a weighting for how quickly its orientation will match the target's.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As it's attached to the torso, it's technically hooked to the animation. It doesn't shift as much on the other axis, however - that's the camera shake modifier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comments are looking much better. I think it's worth waiting until Hugh's back to confirm that he wants this merged in. I think it's perfectly acceptable for us to make available a bunch of example scripts that provide different functionality, even if they aren't perfect. I just don't think it's going to be the magnum opus that was originally planned, and I wouldn't want to mandate that anyone use them, when there are good-looking alternatives out there e.g. NevermoreEngine, which looks like the robase that was planned.
blurDistance = 0 | ||
end | ||
|
||
-- Create and play this tween | ||
tweenService:Create(blur, tweenInfo, {Size = blurDistance}):Play() | ||
|
||
-- Grabs the speed of the target, and dictates goalFoV depending on ceiling and floor as configured | ||
-- The FoV of the camera will increase depending on the speed of the target, within the bounds of the ceil and floor FoV | ||
local targetSpeed = target.Velocity.magnitude | ||
local goalFoV = math.max(math.min(targetSpeed, ceilFoV), floorFoV) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's a math.clamp
for this.
No description provided.