Hi
Im making a game in DBPRO.
I use Nuclear glory collision.
Now i have made a sphere i can control around on a level i have made in Cshop ( It is an x file ).
But when i move my sphere around the half part of the sphere can go through stuff.
And i don`t know how to change the object radius so it will work.
Here is the complete code i use:
` the normal settings
sync on
sync rate 30
hide mouse
` start the collision system
startcollisionPRO( 000000000,000000000,00000000 )
` start the collision debugger
startcollisiondebugPRO()
`set the exclusive to 0
setcollisionexclusive( 0 )
` The constants
#Constant NCULL_COUNTER_CLOCK 1
#Constant NCULL_CLOCK 2
#Constant NCULL_NONE 3
#Constant TYPE_NGC_ELLIP=1
#Constant TYPE_NGC_MESH=2
#Constant ELLIP_2_ELLIP=1
#Constant ELLIP_2_POLY=2
#Constant RESP_STICK=1
#Constant RESP_SLIDE=2
#Constant RESP_SLIDE_NO_SLOPES=3
#Constant RESP_SLIDE_NO_GRAV=4
#Constant RESP_SLIDE_NO_ACCEL=5
#Constant RESP_NONE=6
#Constant DYN_NO_RESP=1
#Constant DYN_RESP=2
#Constant DYN_RESP_NOTURN=3
` My own constants
#constant type_player = 2
#constant type_wall = 1
rem set collision types
SetCollisionsPRO(Type_Player, Type_Wall, ELLIP_2_POLY, RESP_SLIDE, DYN_NO_RESP,Auto_Priority )
` load the ball run map
load object "media/map/ball run map.x",1
position object 1,0,0,0
` load the sounds and music
load music "media/music/music fun.mp3",1
` load the textures
load image "media/texture/goal texture.bmp",1
load image "media/texture/grass.bmp",2
` Make the player object
make object sphere 2,10
texture object 2,2
position object 2,0,60,20
collisiontypePRO( 1,type_wall )
collisiontypePRO( 2,type_player )
` Player variables
player_speed = 4
`loop the music
loop music 1
rem set radius for player as it is being used as an ellip collision
SetObjRadiusPRO(1,object size x(2)/80,object size y(2)/80,object size z(2)/80)
`set object gravity
SetObjGravityPRO( 2, 1 )
do
` The ball control input
move object 2,player_speed
if leftkey() = 1
move object left 2,player_speed
endif
if rightkey() = 1
move object right 2,player_speed
endif
` set the camera to follow the player object
set camera to follow object position x(2),object position y(2),object position z(2),0,10,10,10,0
` run the collision system
runcollisionPRO()
sync
loop
Thanks
Regards
The Nerd