Making the molotov "fire ring" not hover in the air when hitting a wall

I’m trying to make a molotov’s fire ring, but if I position the ring at the spot of contact, it may hover in the air (e.g. if you throw the molotov at a wall or at a slope). What’s the best way to fix this issue?

If you wish for the ring to appear at the ground level above the point of impact, you will have to shoot a raycast from the Molotov object towards the ground as it makes contact with the target, and make use of the position that the raycast returns as reference to where the “fire ring” is supposed to spawn.

As you have not described what the “fire ring” is exactly, nor shown any relevant code. I cannot advise you any further on the matter beyond what I have provided.

The problem with that strategy is that there may be a hedge or something within a model (or there is an extremely steep slope, say 80 degrees). Then, the raycast will still hit the side of the part, and the ring will float.

I actually managed to solve this problem by creating a dummy part to simulate the physics, waiting until the part stops moving, then raycasting downward to find the position. This takes advantage of roblox’s physics to make the fire circle as accurate as possible to gravity.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.