Game Development Community

Jump back

by gamer · in Torque Game Engine · 06/06/2006 (2:14 pm) · 2 replies

I am trying to make my enemy jump backwards when I shoot him. if I use this.applyImpulse("0 0 0","0 0 400"); he does jump up high in the z direction. However if I pass in nonzero x,y component of the velocity, he doesn't jump at all. what's wrong?

%eye = %shooter.getEyeVector();
%vec=vectorScale(%eye,1000);
	  %vec=vectorAdd(%vec,"0 0 500");
	   %this.applyImpulse("0 0 0", vec);
	   //%this.applyImpulse("0 0 0","0 0 400");

#1
06/06/2006 (2:28 pm)
Because you put vec and not %vec in there?
#2
06/06/2006 (2:40 pm)
Yup dumb me