Problom with RodConstraint

I am making a fishing rod, the idea is to change the lure CFrame to the target point and give it velocity,
(the lure has an attachment with RopeConstraint). the problem that when I change the RopeConstraint to RodConstraint and it does not work correctly for some reason, and I can’t find the problem.

Using RopeConstraint (working fine):
robloxapp-20200929-0157134 (1)

Using RodConstraint:
robloxapp-20200929-0204157

(I just changed the “rope” to “rod” and everything else is just the same).

script:

local function fire(part, startPoint, targetPoint)	
	--Anti-gravity effect: add a BodyForce to counter gravity
	local bf = Instance.new("BodyForce")
	bf.Force = Vector3.new(0, workspace.Gravity * part:GetMass() * antiGravity, 0)
	bf.Parent = part
	
	-- Calculate how far we have to travel
	local distance = (targetPoint - startPoint).magnitude
	-- Since speed = displacement / time, our speed is:
	local speed = 25--75
	-- Position our part at the start, pointing to the target
	part.CFrame = CFrame.new(startPoint ,targetPoint)
	-- Shoot the part
	part.Velocity = part.CFrame.lookVector * speed
end

local lure = game.ServerStorage.Items.Fishinglure:Clone()
lure.Parent = workspace	
lure:MoveTo(playerCharacter.HumanoidRootPart.Position + Vector3.new(0, 8, 0)) -- lure starting position
playerCharacter.HumanoidRootPart.Anchored = true -- stop player from moving
fire(lure.Fishinglure, playerCharacter.HumanoidRootPart.Position + Vector3.new(0, 6, 0), mouseHit.p) -- fire the lure
wait(0.1)
	
--creating rope
local distance = (rodPart.Position - mouseHit.p).Magnitude
local rod = Instance.new("RodConstraint", rodPart) -- just changed this to: rod = Instance.new("RopeConstraint", rodPart)
rod.Name = "FishingRod"
rod.Attachment0 = rodPart.Attachment
rod.Attachment1 = lure.PrimaryPart.Attachment
rod.Length = distance
rod.Thickness = 0.05
rod.Visible = true

I believe the problem here might be that RodConstraints have a fixed length, and are solid and not flexible. This means that roblox will try to force the lure around to be at the end of the RodConstraint, causing a very weird and glitchy result.

Why don’t you just use a RopeConstraint, or even better a few parts and Linear Interpolation? A rope has closer properties to a fishing line for the most part.

1 Like

When I use the rope it looks weird because it’s too curved, is there a way to make it less curvy ?

In terms of fishing line visuals, I don’t think ropes or rods will really be too realistic unfortunately. There are many limitations on both of those instances at the moment.

I would recommend what I see most games doing, which is creating your own line with parts and a animation of the curve and extension of the line. You could slap the rod into the animation editor plugin, along with a AnimationController, and then create frames to replicate the physics you would want on the rod as it extends out.

You could also use raw math( specifically linear interpolation ) to create the curve, but this might be a bit complicated when it would be easier to make a quick animation.