I'm making a game for an assignment, having received zero tuition from the lecturer.
The concept is simple. Two cars, one ball.
I've used TDK guide for object slide on the ball and it works great. Not so much for the two vehicles or pitch walls.
All I need is to detect collision between the two vehicles and the pitch walls.
I'm attempting to use sparky's collision and failing superbly.
Setting up my object
IF player1Car=6
LOAD OBJECT "Media\Models\X Models\Vehicles\Beach Bug\H-Beach Bug-Move.X",6
LOAD IMAGE "Media\Models\X Models\Vehicles\Beach Bug\beachBug.DDS",60
LOAD SOUND "Media\Sounds\beepbeep.wav",3
scaleX=2300
scaleY=2300
scaleZ=2300
ENDIF
POSITION OBJECT 6,100,14,250
YROTATE OBJECT 6,270
TEXTURE OBJECT 6,60
SC_setupObject 6,1,2
sc_AllowObjectScaling 6
SCALE OBJECT 6,scaleX,scaleY,scaleZ
SC_UpdateObject 6
In the main Do Loop I call the control and collision function
set cursor 0,0
print collide
collide = sc_ObjectCollision(6,0)
IF collide > 0
`Dec XPos1#, Get OBJECT Collision X()
`Dec YPos1#, Get GROUND Height(1,XPos1#,ZPos1#)
`Dec ZPos1#, Get OBJECT Collision Z()
color object 6,rgb(255,255,0)
else
color object 6,rgb(0,255,0)
ENDIF
Initially I'm simply trying to detect if object 6 collides with any other objects. But nothing.
I'm loosing my mind here.