So i have a camera thats first person on a character and i have a collision code but when i hit the block its SO obvious that the character hit it, then it lags the game a bit afterwards. you may have to replace load object with your character or something
My code:
Rem ***** Main Source File *****
rem setting, player, background, make camera
set global collision on
sync on
sync rate 60
backdrop on
autocam off
load object "C:\Users\Dollie\Desktop\NoName\person.x",1
set object collision on 1
Position Object 1,0,0,0
make camera 1
color backdrop 1,RGB(255,0,0)
rem other objects
make object cube 2,20
position object 2,20,20,0
set object collision on 2
make object cube 3,20
position object 3,20,40,0
set object collision on 3
Do
rem remembers old co'ords
oldx# = OBJECT POSITION X(1)
oldy# = OBJECT POSITION Y(1)
oldz# = OBJECT POSITION Z(1)
rem camera follow player
position camera 1,OBJECT POSITION X(1)+5,OBJECT POSITION Y(1)+5,OBJECT POSITION Z(1)
rotate camera 1,-90,0,0
rem movement
if upkey()=1 then move object up 1,1
if downkey()=1 then move object down 1,1
if rightkey()=1 then move object right 1,1
if leftkey()=1 then move object left 1,1
rem display co'ords
text 10,10,str$(OBJECT POSITION X(1))
text 10,20,str$(OBJECT POSITION Y(1))
text 10,30,str$(OBJECT POSITION Z(1))
rem collision
IF OBJECT COLLISION(1,2) THEN POSITION OBJECT 1, oldx#,oldy#,oldz#
IF OBJECT COLLISION(1,3) THEN POSITION OBJECT 1, oldx#,oldy#,oldz#
sync
loop
thanks guys!
windows vista
dbpro 7_4
Manufacturer TOSHIBA
Rating 4.2
Processor Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz 2.00GHz
Memory(RAM)2.00GB (i can hold 10gbs

)
System Type 32-bit operating system
NOW USING SPARKIES DLL TOO
I want coke, not Pepsi!