Hi GIL,
I'm doing a cut tree system.(For ORK Framework + Makinom but with Makinom Schematic)
I would like to fall the tree in the opposite direction to the player but how? Currently, I use a simple "Rotation", there is something better?

pixelgame.fr/avantis/promo/falling_tree_test.gif
  • I think there are 3 ways to do this:
    - using an animation
    - rotating the tree
    - using rigidbody forces

    I'd guess that using rigidbodies will feel the most 'natural', so you first have to calculate the direction and add force afterwards.
    You can get the direction by subtracting the player's position from the tree's position, i.e. you'd have a Change Variables node that changes 2 Vector3 variables:
    - stores the tree's position
    - subtracts the player's position from the same variable

    Now that you have the direction stored in in a Vector3 variable, you need to use a Vector3 Multiply node to multiply it by the force that should be added to the tree. Finally, use that variable in a Rigidbody Add Force node.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • ok thanks i'll test that.

    This isn't part of ork but do you think it's possible to interact with a tree from the unity terrain by component : collision machine on the terrain and using the child?
  • Hm, I'm not sure about that, you'd have to try that out yourself :)
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.