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.

Author
Message
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 12th Apr 2004 19:34
I am TRYINg to make a FPS. So far I have the gun on the screen and the walking system. I want the gun to aim at the mouse using the center of the screen as coordinates (0,0). How do I do this using DBC?

Thanks in advance
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Apr 2004 21:38
Quote: "using the center of the screen as coordinates (0,0)"


first thing to know - the centre is not 0,0. It's:

x = Screen Width() / 2
y = Screen Height() / 2

The next thing you really need is an Intersect command. In 3D space, pointing at the centre of the screen will not tell you if you hit something in between.

NG's collision system has nice Ray Intersect commands. You can even go as far as knowing precisely where to put the bullet hole.

BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php
Dark Serpent
20
Years of Service
User Offline
Joined: 24th Feb 2004
Location: U.S.A.
Posted: 13th Apr 2004 02:25
Dude if you want mouselook check the monster hunt tutorials.

I'm such a

Login to post a reply

Server time is: 2024-09-22 04:25:43
Your offset time is: 2024-09-22 04:25:43