Okay so I’m basically trying to make a tree chopping system similar to animal crossing, where the tree shakes and can drop items when you chop it.
However, since I am using raycasting to detect if the tree has been chopped, I don’t know what I should use for the origin and direction. At the current moment, I am using the player’s mouse. But, I want this game to have mobile support. What else should I use?
I have tried using HRP.LookVector * agrodistance, but that requires the player to be directly staring at the tree, and I just want it in the general area where the player can hit it.
This is the raycast function:
Sorry if this post isn’t in the right topic, as this is my first post
Any help will be appreciated