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 movement

Author
Message
zeeenza
18
Years of Service
User Offline
Joined: 2nd Jul 2006
Location:
Posted: 31st Aug 2007 02:41
How do you make a gun move left and right (with a little vertical movement) when you walk in an FPS? So far, it just stays in place while walking, so it doesn't look very good. Is this done with an animated 3d model or is there some sort of trigonometry code that would work? I'd also like to know how to do this for a recoil effect if possible.

Thanks

Windows Vista Home Premium :: Intel Core 2 Duo - 2.2Ghz :: 2GB System RAM :: nVidia GeForce 8600M GS - 511MB VRAM
Jerok
19
Years of Service
User Offline
Joined: 7th May 2005
Location: Mars. Wait a sec I\'m on MARS. OMG
Posted: 31st Aug 2007 04:47
It is usually done with a animated model, but you couild do it eigther way. There is not much else to say about it. If you use animations then just play them while moving or shooting or whatever else, and if you are using code use the move object and rotate object commands to produce a look you like.
zeeenza
18
Years of Service
User Offline
Joined: 2nd Jul 2006
Location:
Posted: 31st Aug 2007 09:58
I've tried moving the object already, and it didn't really work. And I don't have a way to animate my gun models (and even if I did, I can't model or animate to save my life). I believe I've heard of a way to do it using sin, cos, and tan functions, but I don't know how to use those in DBP. Mathematically, I understand them, but I don't get how people rotate objects with them in programming since they have to do with right triangles. Does anybody know how I could do something like this, or post an example of how to do it with Dark Basic object functions if possible?

Windows Vista Home Premium :: Intel Core 2 Duo - 2.2Ghz :: 2GB System RAM :: nVidia GeForce 8600M GS - 511MB VRAM
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 8th Sep 2007 09:53
Bio Hazard
17
Years of Service
User Offline
Joined: 12th Sep 2007
Location: Ununited states
Posted: 13th Sep 2007 01:54
yah thats what i was just about to post a topic about on.

what is left behind is left behind, but what is ahead might make a difference to whats left behind.

Login to post a reply

Server time is: 2024-11-25 13:40:34
Your offset time is: 2024-11-25 13:40:34