Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: FritsLyn on August 07, 2013, 02:08:33 AM
-
I have a fence: A-B
I have a car driving towards it.
I need to know at which vector3 in "World" the car will hit A-B.
I found how to do a cross product here:
http://hutonggames.com/playmakerforum/index.php?topic=271.0
And then I should just take cross from A+car..
But A and Car are in Unity-vectors, where we also have Rotation.. How on earth?
Which data goes where?
Thanks a bunch.
-
The normal of the wall and the normal of the car? You can get the normal of a collision and feed it into the action ... is it dot product you want?
-
Oh, maybe it's because I do not know the right math expression, sorry.
I need to return the position where 'car' would hit 'wall'.
What would that be called, if not cross product? Is there a method?
Thank you very much.
-
Hi,
simply perform a ray cast. it will give you the hit position, and normal.
have you tried that?
using pur math to do this will be difficult, because vector operator will give you directions, not "collision" info per say.
bye,
Jean
-
The "wall" is not really there, it was invented so I could explain the math I needed to perform :)
Thank you a lot guys, I will have to rework things so I no longer need to know where one line (defined by game objects placement and direction) crosses another through math.
Cheers, and thanks again, you have helped me a lot :)
Frits