Directional Splatters/Rotation From Raycast

How could I create a part that gets rotated to face towards a position whilst keeping the part aligned to the ground (raycast normal)

For more information, I’m using FastCast to create directional blood splatters, but I’m struggling to find a-way to do this, I’ve tried looking for other topics and couldn’t find anything useful

image of what I’m trying to achieve:

1 Like

Not sure if this is done on the server or the client, but there’s two ways I see being solutions.

First one is using a combination of RunService and CFrame LookAt. Every frame you would make the part look wherever you need it to by having it look directly at another part.

The other way is using body gyros to make it follow another part.

Although these ideas solve your problem, why dont you just calculate a vector between the character and something else to create your directional vector? You could then use impulse and Roblox’s gravity to detect when the part collides with another then place the blood splatter on that. It would look realistic imo.

Good luck!

I could use cframe.LookAt() but then the decal wouldnt be flat of the ground and would be half clipping into it

The part wont have collisions and it needs to be anchored

as i was giving up, found a post that worked
Aligning Object to Surface using CFrame:fromMatrix() - Resources / Community Tutorials - Developer Forum | Roblox

1 Like

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