Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions docs/getting-started/tutorials-and-examples/gravity-gun.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Input.Subscribe("MouseUp", function(key_name)

-- Gets the end location of the trace (5000 units ahead)
local trace_max_distance = 5000
local end_location = viewport_3D.Position + viewport_3D.Direction * trace_max_distance
local end_location = start_location + viewport_3D.Direction * trace_max_distance

-- Determine at which object we will be tracing for (WorldStatic - StaticMeshes - and PhysicsBody - Props)
local collision_trace = CollisionChannel.WorldStatic | CollisionChannel.PhysicsBody
Expand Down Expand Up @@ -123,7 +123,6 @@ Client.Subscribe("Tick", function(delta_time)
-- Get the camera location in 3D World Space
local viewport_2D_center = Viewport.GetViewportSize() / 2
local viewport_3D = Viewport.DeprojectScreenToWorld(viewport_2D_center)
local start_location = viewport_3D.Position

-- Gets the new object location
-- (camera direction * 'distance' units ahead + object offset from first Hit to keep it relative)
Expand Down
Loading