Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make a choppable tree like in this youtube video?

Asked by 3 years ago

Hey, so I've been trying to make a choppable tree lately that seems realistic by leaving axe marks in the tree then eventually leading to the tree to fall over. So I've done a bit of research on how to do it but the best thing I could find was an example of what I wanted to accomplish. I know how to do everything but "chip away" pieces of the tree. Here's the video I was talking about: https://www.youtube.com/watch?v=MvBiRnCdWgw

If somebody could lead me in the right direction that would be great. Thanks!

0
It looks to me like they have a set of parts on a hardcoded Y position, then the rest of the tree is separate larger parts. It also seems like they get the direction of the player rather then the actual axe. Nickuhhhhhhhhhhhhhhh 834 — 3y
0
How would you get the direction of the player? That's the only problem I'm having. Master_Aaron 59 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

You could write a script that determines from which direction the axe hits, and adjusts the size depending on that. Judging by how the parts shrink, that seems to be how he does it. Also make sure that it separates the part that it hits, or it could shrink the whole tree. You can also make the tree out of several different parts if that would be easier.

0
Hope I could help! CowboySprite 5 — 3y
0
Well, the only problem with that is that I haven't got a clue on how to write a script the determines which direction the axe hits. Master_Aaron 59 — 3y
0
Vector3 and it's data types can allow you to determine things like Direction and Position. CowboySprite 5 — 3y
0
If it isn't a chunk of your time could you write out a script for me to go off of? I don't know how to determine the direction of the axe Master_Aaron 59 — 3y
0
Sorry, but I'm going to have to decline. This would be a good point to learn how Vector3 works though, as it will be essential for making games. Also, to save you a bit of trouble, the exact thing you're looking for is called a Ray. CowboySprite 5 — 3y
Ad

Answer this question