Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / gun position not working

Author
Message
Help creating a FPS
14
Years of Service
User Offline
Joined: 21st Oct 2009
Location:
Posted: 5th Dec 2009 23:38 Edited at: 6th Dec 2009 01:18
I hate to post about this because what I'm trying to do is something simple, but I'm getting hacked so I'm posting. Does anybody see anything wrong with this code? It should be working. Its not showing my gun. I dont know if it is transparent, or simply not there. Either way it should show up. I've even scaled my gun to the size of the level to be sure it wasn't placing it anywhere wierd. Its just not there. If I skip this code and just position it on my screen it shows up, but I want it to follow my mouse movements and player.



Nathaniel
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 6th Dec 2009 14:22
this

Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 6th Dec 2009 16:43
if its first person u can just do

Lock Object On ( obj );

and it glues to the screen



Help creating a FPS
14
Years of Service
User Offline
Joined: 21st Oct 2009
Location:
Posted: 10th Dec 2009 01:20
@pcRaider

That works great with a cube, but I need it to work with my .x gun. It doesn't show up when I replace it with my gun.

@Outscape

That command doesn't work for me. I've seen it all over the forums, but when I use it, it sends my gun halfway across the level. If I lock my player onto the screen it seems to work somewhat for my gun, but it pivots weird. When I'm going one direction it looks like I'm holding the gun in my right hand, but if I turn around the gun switches to the left hand. Its not very realistic.

Nathaniel
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 10th Dec 2009 03:22
i think i see the problem
your gun is not centered properly, eg, it is very far along the Z or X coord (in the actual object)

that means it doesnt actually seem to appear because its too far away

you can change this by loading the model and repositioning it in a model editor

or, in dbpro you will have to position it in a way so it is where the center point should be

(eg if the model is 100 off centered in the Z coord, you have to position the object -100 on the zcoord so it appears centered correctly)

that should fix the positioning problem

as for the swapping hands, you must have a reposition code somewhere because when you lock an object to the screen, IT DOESNT ACTUALLY EXIST THERE, it just appears to exist there, and it locks onto the screen like sprites, so i dont know how the weapon is "swapping hands"



Login to post a reply

Server time is: 2024-09-28 12:16:22
Your offset time is: 2024-09-28 12:16:22