Making an arrow arc

I am making a crossbow that shoots arrows using the default physics engine. When I shoot an arrow, however, but it does not rotate downward over time with gravity like a normal arrow would in real life.

I have tried using a BodyGyro by changing the gyro’s CFrame at runtime to the arrow’s velocity to achieve this, but it does not work. Is there any easy way to achieve this using BodyMovers?

2 Likes

Does your arrow have more than one part? It seems the only way to make this happen with physics is if the density of the arrowhead is higher than the shaft/fletching.

1 Like

Roblox physics does not work like that, unfortunately.
robloxapp-20211108-1626041

1 Like

This seems like a fun challenge, and I need arrows eventually too. I’m going to join in this chase!

1 Like

I actually just found a solution to this just now using this line of code:

arrow.BodyGyro.CFrame = CFrame.lookAt(arrow.Position,arrow.Position + arrow.Velocity)

robloxapp-20211108-1644322

I am not sure if there is a better way to do this, but I would recommend this method on projectiles that have no collisions to prevent physics glitching issues.

If anyone wants to test it yourself if you ever have the same issue, here is the file: arrowarc.rbxl (38.0 KB)

4 Likes

I found an alternate way to manipulate this. I added attachments and vector forces to the shaft and arrowhead, with the shaft pushing straight up, and the arrowhead pushing down. Once I did that, the arrow started flipping like crazy, so I reduced the force until I found a happy middle. I found that you don’t need a lot of force to make the front land first.

10 up = 0,10,0
10 down = 0,-10,0

image

Ignore the annoying birds. :wink:

1 Like

I should add, when you make the force really high, you get thrown hammers lol.

That is a method I did not think of! I had that issue as well with my method, so I’m pretty sure either method works for most scenarios, and is why I suggest obviously turning off collisions for projectiles.

1 Like