Hi,

How to get reflect angle between two object OnTriggerStay and Instantiate another object on collision point and move to reflect direction…

how to calculate reflect point of two object and direction unity

Thanks

Hi,

How to get reflect angle between two object OnTriggerStay and Instantiate another object on collision point and move to reflect direction…

how to calculate reflect point of two object and direction unity

Thanks

But how to calculate angle

i havent run my program, so i wouldnt have an idea how to exactly get it done, but heres what i would do

get the direction of the object before it even hits, somehow like a routine check of distances: x and y of past location and current location (view tutorials on step counting). use Mathf.Atan of y/x to get its angle. find the point of contact (i think there is a function to get first contact point, but im not quite sure) so after that subtact position x and y of contact point to position of the center of motion of the object moving, with that you have computed the angle of collision, then you can subtract the angle of collision to the angle of motion (counterclockwise) then add it clockwise. then you have the angle… i hope it works

but if you are to make something bounce, why not try increasing mass of the boulder (im not quite sure about this… Ignore this at once XD)