2 registered members (3s05bmmc, flink),
650
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
camera += gun
#150838
08/28/07 19:46
08/28/07 19:46
|
Joined: Aug 2007
Posts: 27
Memphis
OP
Newbie
|
OP
Newbie
Joined: Aug 2007
Posts: 27
|
hi this maybe has been brought up in other threads, but i cant find anything useful.... i've been working on a small FPS game, i've run into a problem.... character += camera + gun ok so thers like 10+ guns, i've played about with Code:
vec_for_vertex(temp, player, 870);
but it just doesnt look good no matter what i do, i'm trying to make it look like its actually in the players hand, as it will also in the future be multiplayer. ok so my second option was to create the gun with model of arms... then hide the character + gun from camera view, and show these arms+gun as local entity in the camera, but .genius only supports 1 item if i am correct... if anyone can give me some sugestions, snippets to examine.. or any other form of help, would be appreciated. thanks in advance...
|
|
|
Re: camera += gun
[Re: Memphis]
#150839
08/28/07 20:00
08/28/07 20:00
|
Joined: Jan 2007
Posts: 1,619 Germany
Scorpion
Serious User
|
Serious User
Joined: Jan 2007
Posts: 1,619
Germany
|
if you want to have the model as a typical FPS, just write: Code:
vec_set(weapon.x,camera.x); vec_set(temp,vector(10,2,-5));//play with it vec_rotate(temp,player.pan); vec_add(weapon.x,temp); vec_set(weapon.pan,player.pan);
enjoy
|
|
|
Re: camera += gun
[Re: Scorpion]
#150840
08/28/07 20:12
08/28/07 20:12
|
Joined: Aug 2007
Posts: 27
Memphis
OP
Newbie
|
OP
Newbie
Joined: Aug 2007
Posts: 27
|
thanks for your response scorpion ok this kinda would work, if there was no player arm animations, but if the players arm moves, the gun wont position itself to the hand... which i solved using the vec_for_vertex, but still this doesnt look so nice, doesnt actually look like its being held.... take here > http://www.jxp.ca/media/speciaux/unreal5lf7gk.jpg < for example. notice the opponent has hold of a gun, even when the model is animated the gun is still held in its hand. regardless of also weapon switching.... im looking for something in this sort of direction....
|
|
|
Re: camera += gun
[Re: Metal_Man]
#150843
08/29/07 08:53
08/29/07 08:53
|
Joined: Aug 2007
Posts: 27
Memphis
OP
Newbie
|
OP
Newbie
Joined: Aug 2007
Posts: 27
|
hi, thanks for your replies... ok
Nemisis : the problem with this solution is, if there is say 20 models and 20 different guns, thats alot of animation lol.... but thanks it is one option...
Metal_Man : yes i calculate the movement of the player to position the gun, but still it jus doesnt look right, it seems you are able to see through the player and see the gun, even tho the player is in front of the gun, very odd....
i guess to model the arms with each gun, probably is best way around this...
but is it possible to hide the player and a model of the gun locally, so multiplayer can see the vec_for_vertex method, and the player can see the arms with gun model ?
thanks in advance.
|
|
|
Re: camera += gun
[Re: Memphis]
#150844
08/29/07 12:24
08/29/07 12:24
|
Joined: Jan 2007
Posts: 1,619 Germany
Scorpion
Serious User
|
Serious User
Joined: Jan 2007
Posts: 1,619
Germany
|
yeah...there is something as ent_reatelocal.... to add to a vertex and rotate it by a second vertex is also really easy: Code:
vec_for_vertex(temp,player,1234); vec_set(weapon.x,temp); vec_for_vertex(target,player,1235); vec_sub(target,temp);//Get the direction vec_to_angle(weapon.pan,target);
|
|
|
|