weapon shooting in 3rd person view by using crosshairHUD
by Adithyaa Srikkanth · in Torque Game Engine Advanced · 05/15/2009 (2:37 am) · 3 replies
hello every body.i am trying to shoot the AIplayer or something in 3rd person view by using the crooshair hud in TGEA1.8.1. just like 1st person view, in 3rd person view also the weapon projectile is coming from the center point of the scree and it is not going to the area which the cross hair is representing. i tried to search the solution in the forums i found some suggestion and tried those but those are not working properly. so can anyone of you tell me the solution for this???
thanks in advance.
thanks in advance.
#2
You will also have to adjust the correctMuzzleVector Field in your weapon image datablock
05/16/2009 (9:01 am)
If it's this Crosshair you tried, that was a potential port to 1.7.1 of the old 3rd Person Super Crosshair, it should be noted that some changes would need to be made for it to work in 1.8.1.You will also have to adjust the correctMuzzleVector Field in your weapon image datablock
// When firing from a point offset from the eye, muzzle correction // will adjust the muzzle vector to point to the eye LOS point.If it's set to true it will fire straight to where you are looking, if set to false it will be as offset as the offset is for your weapon.
#3
i got this resource and i tried this, it is working properly ,but i have one problem with that. i.e in the 3rd person view the crossbow is moving along with the mouse movement and the cross hair is not appearing. i want to move the cross hair along with the mouse movement. so that the player can knows easily aim the target. can you tell me how to move the CrossHair along with the mouse movement???? thanks in Advance....
05/18/2009 (10:53 pm)
http://www.garagegames.com/community/forums/viewthread/67176i got this resource and i tried this, it is working properly ,but i have one problem with that. i.e in the 3rd person view the crossbow is moving along with the mouse movement and the cross hair is not appearing. i want to move the cross hair along with the mouse movement. so that the player can knows easily aim the target. can you tell me how to move the CrossHair along with the mouse movement???? thanks in Advance....
Torque Owner Gerald Fishel
Development Ninja
1) Cast a ray from the camera position along the camera's orientation, and determine the area that the projectile is expected to hit based upon the crosshair (which I presume will be in the center of the screen).
2) Determine the direction vector from the muzzle point of the weapon to the target point. Just subtract the muzzle position from the target point and normalize.
3) Fire the projectile from the muzzle point of the weapon in the direction calculated in step 2.
Cheers