PDA

View Full Version : Projectile Rotation and collision


Brood_of_Evil
8th Nov 2001, 11:20 PM
Ok here's the question: How can I make a projectile (PHYS_Projectile), change it's rotation perpendicular to the surface it has collided with (with HitWall perhaps?) If you're not sure of what I am talkin about, check jpg in the attachment. Please I will appreciate your response. Thanks :)

Brood_of_Evil
8th Nov 2001, 11:24 PM
Umm sorry here's the attachment

Postal
9th Nov 2001, 05:17 AM
Damn, I did that once, but I cant recall how.

I was messig aroung with making a grappling hook, and I wanted the hook to go in at an angle, and I accidenty set it up so it was like how you said.

I will look thru my code archive and see if I can find the code to help.

EasyRaider
9th Nov 2001, 05:40 AM
I'm not quite sure what you're asking. Should it point straight out from the wall? If so, it's really easy:

function HitWall(...
{
SetRotation(Rotator(HitNormal));

[edit]
Whoops! Forgot SetRotation() :o

Papapishu
9th Nov 2001, 09:54 AM
As I have fathomed it, HitNormal is a vector that is 90 degrees up from the plane it lands on.
Right?

Brood_of_Evil
10th Nov 2001, 02:53 AM
Thanks guys; EasyrideR_/\ the code worked, thanks a lot.

Eater1
10th Nov 2001, 11:03 AM
papinshu: yes, it is.