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.

Code Snippets / bullet function

Author
Message
Chenak
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 30th May 2003 18:31
Hi there. I've made a bullet function for my game and i need a little help with it. Sorry if its in the wrong posting area but i dont know what topic it falls under .

Anyway, what i need it to do is spawn a bullet which goes in a set direction relative to the angle of the player (in other words shoot to where the player is pointing). It works to an extent, it spawns the bullets and they move but not in the right direction and sometimes they fly off in random directions. Can anyone help, pretty please .

Cheers.
Once you start down the Dark Path, forever will it dominate your destiny...
hexGEAR
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 30th May 2003 20:25
is this for a first or third person game? you could use set object to camera/object orientation or even rotate the bullet object to the same angle as the camera or 3rd person object is facing (you'll need to use fix object pivot to stabalise the bullet though)

everyday of life is a new chapter that has already been fortold but is up to the soul to capture.
Chenak
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 30th May 2003 22:00
Yes! it works! thanks hexgear . In case you curious its a 3rd person game and its nearly finished

thanks again

Once you start down the Dark Path, forever will it dominate your destiny...

Login to post a reply

Server time is: 2024-05-04 04:20:30
Your offset time is: 2024-05-04 04:20:30