1st person weapon
by Xavier "eXoDuS" Amado · in Torque Game Engine · 03/12/2002 (8:00 pm) · 7 replies
How does the engine determine the position of the weapon on 1st person view?
I made my own weapon which looks absolutely correct in 3rd person view, mounted correctly, etc
But in 1st person view i cant even see it...
I tried moving the bounding's box pivot point and that adjust the position of the weapon on the screen (ie, i moved it all the way back and i could see a piece of the weapon.
Also noticed that renderfirstperson is set to true on the player's datablock, not sure why it wont mount it the same way as in 3rd person view :(
Anyone got any ideas?
I made my own weapon which looks absolutely correct in 3rd person view, mounted correctly, etc
But in 1st person view i cant even see it...
I tried moving the bounding's box pivot point and that adjust the position of the weapon on the screen (ie, i moved it all the way back and i could see a piece of the weapon.
Also noticed that renderfirstperson is set to true on the player's datablock, not sure why it wont mount it the same way as in 3rd person view :(
Anyone got any ideas?
About the author
#2
-Tim aka Spock
03/12/2002 (10:03 pm)
in milkshape you have to have your model at 0,0,0 to work correctly in first person...not sure how that traslates to max.-Tim aka Spock
#3
I noticed in the head version that you can't see your player's body in 1st person any more. Maybe this is part of that?
03/12/2002 (10:22 pm)
In you weapons ShapeBaseImageData datablock, set the offset to something - offset = "0 0 0";I noticed in the head version that you can't see your player's body in 1st person any more. Maybe this is part of that?
#4
ryan
03/13/2002 (5:14 am)
its eyeoffset = "x x x" it takes a few times of saving and firing the game up to get them to line up properly. You can turn your own player model on and off in the client config files. its something like $pref::viewmyplayer=0 or something to that effectryan
#5
And i dont think it has to do with datablock code cause im using the rifle's script as a base code for this new weapon and the rifle looks perfect in-game :(
Also, why should it change the weapons positon when in first person? isnt the first person view just like a 3rd person view but with the camera on the players head? i mean you should see exactly the same disregarding what mode you are in ... shouldnt you?
At least it should when you have renderfirstperson set to true...
03/13/2002 (3:07 pm)
its renderfirstperson = true/false; in the player datablock actuallyAnd i dont think it has to do with datablock code cause im using the rifle's script as a base code for this new weapon and the rifle looks perfect in-game :(
Also, why should it change the weapons positon when in first person? isnt the first person view just like a 3rd person view but with the camera on the players head? i mean you should see exactly the same disregarding what mode you are in ... shouldnt you?
At least it should when you have renderfirstperson set to true...
#6
// Specify mount point & offset for 3rd person, and eye offset
// for first person rendering.
mountPoint = 0; // point weapon is mounted on the player (right hand in example).
offset = "0 0 0"; // offsets the weapon from player mountPoint0 in 3rd person view. Can appear by his head if you want.
eyeOffset = "0.1 0.2 -0.55"; // offsets the 1st person viewpoint of the weapon so the rifle appears on the screen in 1st person. In this case the offset brings the rifle image up and to the left.
I set the eyeOffset to = "0 0 0"; If it's anything other then that the weapon doesn't recoil or bounce/move with the player. The only thing is the default player holds the weapons down by his hip so smaller weapons may not be visible in 1st person view without using the eyeOffset. Once we have our own player models in use, this won't be an issue.
03/14/2002 (8:43 am)
Rifle.cs code:// Specify mount point & offset for 3rd person, and eye offset
// for first person rendering.
mountPoint = 0; // point weapon is mounted on the player (right hand in example).
offset = "0 0 0"; // offsets the weapon from player mountPoint0 in 3rd person view. Can appear by his head if you want.
eyeOffset = "0.1 0.2 -0.55"; // offsets the 1st person viewpoint of the weapon so the rifle appears on the screen in 1st person. In this case the offset brings the rifle image up and to the left.
I set the eyeOffset to = "0 0 0"; If it's anything other then that the weapon doesn't recoil or bounce/move with the player. The only thing is the default player holds the weapons down by his hip so smaller weapons may not be visible in 1st person view without using the eyeOffset. Once we have our own player models in use, this won't be an issue.
#7
03/14/2002 (8:57 am)
Thanks, i think that answers to my question! :)
Torque Owner Ace