Hi all
I am a relative newcomer to the world of DPPro and am struggling with some 3D apsects...
I do have some familiarity with BASIC as a language though
I've built a 'world' using an array and cubes to form a Wolfenstein3D-esque level. my issue lies with doors..
I built the array using a 64x64 grid with 0=nothing 1=wall 2=door
e.g
and the code looks like this...
for z=1 to 64
for x=1 to 64
read level1
if level1=0 then goto skipper
if level1=1 or level1=3
make object cube obj,64
position object obj,pos_x+(x*64),0,pos_z+(z*64)
endif
if level1=2
make object box obj,64,64,16
position object obj,pos_x+(x*64),0,(pos_z+(z*64))
endif
skipper:
inc obj
next x
next z
NOT INCLUDING FULL ARRAY DEFINITION HERE!!
level1
data 1,1,1,2,1,1
data 1,0,0,0,0,1
data 1,0,0,0,0,1
data 1,1,1,1,1,1
level1
data 111211
data 100001
data 100001
data 111111
===================================================
I can differentiate between 'walls' and 'doors' but i dont know how to collide correctly with objects.
(Just using "control camera with arrowkeys" and 'automatic camera collision')
Am i able to 'read' which object the camera collides with or do i need to setup my own collision detection code for objects?
Also are there any good tutorials about object collision and detection. Ive done a search but it seems to bring up stuff about FPSC which i dont think is relevent to this project.
Im doing quite well i'd say for 20days lol and dont really want to be hindered by doors lol.. Stuck in a room is no fun for the player!
Thanks in advance