Making a Tree Fall Away From Player

Preface: This post could fall under under build support because I need help with the physics objects in studio, but the solution may be a code issue.

I am trying to make a tree-cutting system which makes a tree model tilt and fall away from the player once it has been cut.

The model itself consists of a trunk, a few leaf blocks, and a hitbox for the tree. Every part is welded to the hitbox and all parts are marked as “massless.”

My approach involved the using Torque object because I wanted the tree falling to look natural and still be affected by gravity(rather than some CFrame lerp which would look unnatural), and since the Torque object uses a Vector3 value I thought it would be easy to compare the tree’s position with the character’s. However, even though all parts are marked as massless, the Torque(and AngularVelocity) object needed an absurd value to even get the tree to budge(>1000000 per axis), and once the tree model did tilt the force just pulled it across the baseplate.

What I’m trying to gain from this post is both:

  • A better understanding of these physics objects(and why they seem to stop working on bigger models even though the parts have no mass)

  • A solution/different approach to my desired result

Was this post clear? Can I provide any more visual aid? Let me know :+1:

1 Like
function invertDifference(pos1,pos2)
	local diff = pos1-pos2
	return pos1+diff
end

The first position would be the tree and the second position would be the player.

This will just return a Vector3. How could I apply this Vector to move the tree? Should I continue to use the physics objects or just scrap them

It gives you a position that is opposite to the player, relative to the tree. I don’t know how you’re handling your physics, but a position should be enough to do the rest.

You can apply a force from the product of the unit vector and the tree’s mass unless you want to create an absurdly complicated system.

Why not just use a hinge system?