Hello! Currently I’m working on a boulder puzzle, where if a player uses an elemental projectile that matches the element of the boulder, than I add force to the boulder to push it. However It’s a little hard to control because right now it just adds force forward using its rigidbody. (because thats how i have it coded at least) I was wondering if anyone had any ideas of determining which directional force should be applied based on where the projectile hits.
Nevermind I found the answer, rather than using
rb.AddForce(transform.forward);
I used
rb.AddForce(other.transform.forward);
which other is in my ontriggerenter method which checks for a projectile tag.
1 Like