Get angle of face collided with, to ise for Angle of incidence is equal to reflection

I saw a file about radio waves and bounces,

I put this together, but it needs collision with the normal to re-align the mesh to the incidence=reflection line,

to make it look like it bounced :smiley:


PhotonEmit.blend (459 KB)

Back in Blender 2.49b you could use something like this:

You’ll have to hunt around for the up to date version as the new python is not documented in as friendly a way as 2.49b was.

I think Mathutils is now mathutils and some of the functions seem to be built in so you don’t have to import.
Also this just gets you a vector, how you turn that in to something you can use is another matter.

Maybe you can use this woth a textured plane:

This looks promising, but the issue is that the impact surface = angles and LinVelocity is all I can think of,

linVelocityReflect = object.linVelocity.copy() * AngleVector?


I am not proficient with 3d roation matrix yet, :frowning:

help ?

I’m not sure, perhaps set the linear velocity to zero first, align your object with the required vector and then restart the velocity?
Or just simply align the object and set the velocity to affect the object locally?

I don’t really know enough about vectors and mathutils, just that most things can be acheived without using them, there are usually other tools that can fudge an equivalent effect without getting too technical. :slight_smile: