Projectile going straight ahead
by Ted Lilljegren · in Technical Issues · 02/12/2008 (12:47 pm) · 2 replies
Here is a easy question for ya:
Using the onImageFire function provided with starter.fps, i want a projectile to go straight ahead from the playerObjects facing, and not from the muzzle point. I have tried replacing:
%muzzleVector = %obj.getMuzzleVector(%slot);
With:
%muzzleVector = %obj.getEyeVector();
And:
%muzzleVector = %obj.getForwardVector();
Neither functioned the way i want it to, what am im doing wrong here? have i missed out on something entirely?
%muzzleVelocity = VectorAdd(
VectorScale(%muzzleVector, %projectile.muzzleVelocity),
VectorScale(%objectVelocity, %projectile.velInheritFactor));
The vectorAdd function only increases the speed right, it does not affect the projectiles facing at all?
Thanks for your time
Using the onImageFire function provided with starter.fps, i want a projectile to go straight ahead from the playerObjects facing, and not from the muzzle point. I have tried replacing:
%muzzleVector = %obj.getMuzzleVector(%slot);
With:
%muzzleVector = %obj.getEyeVector();
And:
%muzzleVector = %obj.getForwardVector();
Neither functioned the way i want it to, what am im doing wrong here? have i missed out on something entirely?
%muzzleVelocity = VectorAdd(
VectorScale(%muzzleVector, %projectile.muzzleVelocity),
VectorScale(%objectVelocity, %projectile.velInheritFactor));
The vectorAdd function only increases the speed right, it does not affect the projectiles facing at all?
Thanks for your time
About the author
#2
Edit: eyeVector is the eyeNode of the model and NOT which way the camera faces right?
Edit: the dude in the thread asked for a location, and locations cant be described through vectors but only through points?
02/12/2008 (2:18 pm)
Nice. And that would make the projectile travel to the given point at 60 units speed, in whichever way it is scaled?Edit: eyeVector is the eyeNode of the model and NOT which way the camera faces right?
Edit: the dude in the thread asked for a location, and locations cant be described through vectors but only through points?
Torque 3D Owner mb
www.garagegames.com/mg/forums/result.thread.php?qt=33711