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
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 4th Jan 2003 10:35
I am making a shooter. the problem is when i turn the sphere that is me, the gun i have next to it is turnling wierd. heres the code;

`Hide Mouse
Hide Mouse

`Sync
Sync On
Sync Rate 30

`Make Matrix
Make Matrix 1,10000,10000,20,20

`Make Texture
Load Bitmap "grass1.bmp",1
get image 1,0,0,256,256
delete bitmap 1

`Texture Matrix
Prepare Matrix Texture 1,1,1,1
Fill Matrix 1,0,1

`Make Object
make object sphere 1,20

`Make gun
make object cylinder 2,2
scale object 2,100,100,500

`position gun
position object 2,200,0,200

`Position Object
Position Object 1,100,0,100

`Main Loop
Do

`Variable
angley#=object angle y(1)
angley2#=object angle y(2)
oldx#=x#
oldy#=y#
oldz#=z#
oldangley#=angley#
oldangley2#=angley2#

`Control Camera
If Upkey()=1
XTest#=newxvalue(x#,angley#,20)
ZTest#=newzvalue(z#,angley#,20)
If XTest#>0 and XTest0 and ZTest#0 and XdTest0 and ZdTest#
"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
striker25
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location:
Posted: 4th Jan 2003 10:52
i assume that isnt all the code? cause your missing your sync and loop..but anyway, you haveto attach the gun to the camera so it stays with it...try this bit of code...


`position gun
position object 2,200,0,200
LOCK OBJECT ON 2

that should solve a few problems.

Login to post a reply

Server time is: 2024-04-14 06:12:40
Your offset time is: 2024-04-14 06:12:40