Hi, I've gotten to a point where I can't avoid the fact any longer that DBC's sliding collision sucks. I can't just wok with boxes anymore. I've been trying to learn how to do polygon sliding collision along with ramps with Sparky's in DBC, and haven't had much success. zzz gave me a helpful tut he had used himself, but I couldn't get very far with it.
Basically, I need to translate this code into sparky's so that it will deal with polygon collision, ramps, and still allow me to work with the gravity at any time outside of this goto.
_gravityandcollision:
`Gravity
plrgrav#=plrgrav#-0.1
if plrgrav#<-2:plrgrav#=-2:endif
plry#=plry#+plrgrav#
`Player Collisions
position object 1,plrx#,plry#,plrz#
if object collision(1,0)>0
dec plrx#,get object collision x()
dec plry#,get object collision y()
dec plrz#,get object collision z()
if get object collision y()<0:plrgrav#=0:endif
if get object collision y()>0:plrgrav#=-0.01:endif
endif
return
I'm really stuck on this one, and so all I can think to do. I've just tried so many different things with sparky's and I just can't work it out; it doesn't seem to follow the same set of logic I use in most of my coding, or I just don't understand it yet. I'm posting the bare bones native sliding collision and gravity I'm using, in hopes that someone will see it and know the sort of thing I'm looking for.