Game Development Community

Projectile initial position

by genomegames · in Torque 3D Professional · 04/03/2011 (4:50 am) · 4 replies

Hello everybody!
I look in WeaponImage::onFire method and see that a value of the projectile initial position is:
initialPosition = %obj.getMuzzlePoint(%slot);
But projectiles shoot from the character's eye point.

I think they must exit from the WeaponImage's muzzle point. Why do they not?? How can I make it?
Thank you.

#1
04/03/2011 (5:08 am)
if I shoot from the first person mode, projectiles exit from the muzzle point;
if I shoot from the third person mode, projectiles exit from the eye node;
#2
04/03/2011 (5:53 am)
Try to tweak these values.They are used to specify the point and muzzle correction for 1st and 3rd person.

mountPoint = 0; // 3rd
offset = "0.0 0.15 0.025"; // 3rd
eyeOffset = "0.25 0.6 -0.4"; // 1st
correctMuzzleVector = false;

For 3rd person I believe you have to set your mountPoint number.It does matter if your number is not the eye node.
#3
04/03/2011 (6:42 am)
Thanks for your reply, I will try...
#4
04/03/2011 (8:47 am)
if I set
offset = "0 0 0";
eyeOffset = "0 0 0";
CorrectMuzzleVector = true;
projectile initial position is Weapon Image muzzle point, it's what I need, but projectiles don't fly to target