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
Wu dynasty
13
Years of Service
User Offline
Joined: 7th Feb 2013
Location: In a democracy
Posted: 19th Feb 2013 17:27
I need help on a school project. I would like to have the camera follow the car. I would also like to have a volcanoe in the middle of the room. Any help is appreciated, serious answers please.

rem SlidingCollision
sync on : sync rate 60

rem create floor
make object box 1,400,10,400 : position object 1,0,-5,0

rem create walls
make object box 2,400,100,10 : position object 2,0,50,-200
make object box 3,400,100,10 : position object 3,0,50, 200
make object box 4,10,100,400 : position object 4,-200,50,0
make object box 5,10,100,400 : position object 5, 200,50,0

rem Set floor and walls to box collision for rectangle roamer
make object collision box 1,-200,-5,-200,200,5,200,0
make object collision box 2,-200,-50,-5,200,50,5,0
make object collision box 3,-200,-50,-5,200,50,5,0
make object collision box 4,-5,-50,-200,5,50,200,0
make object collision box 5,-5,-50,-200,5,50,200,0

rem rectangle roamer for box collision
load object "e:\Nathan\Doomsday Rocks\objects\MILVEH14.x",41 : position object 41,95,31,50
make object collision box 41,-20,-10,-20,20,10,20,0


s#=1
a#=1
dist#=-20 : ` distance camera sohuld be behind player
height#=5 : ` height above player that camera should be
smooth=10 : ` smoothing value
do
if upkey()=1 then move object 41,2
if downkey()=1 then move object 41,-2
if leftkey()=1 then yrotate object 41,wrapvalue(object angle y(41)-3)
if rightkey()=1 then yrotate object 41,wrapvalue(object angle y(41)+3)

hit=object collision(41,0)
if hit>0
ax#=object position x(41)-get object collision x()
ay#=object position y(41)-get object collision y()
az#=object position z(41)-get object collision z()
position object 41,ax#,ay#,az#
endif
sync
loop

You are entering the Wu Dynasty. Boomshakalaka
-Nathan
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 19th Feb 2013 20:42
One simple method for a camera chase is to attach a hidden limb to your object, offset it the desired amount and then during your loop position the camera to the limb's position. You can then pitch or point the camera to your main object.

D.D.
pcRaider
19
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 20th Feb 2013 04:00

Login to post a reply

Server time is: 2026-07-07 09:05:04
Your offset time is: 2026-07-07 09:05:04