collisions?

Blitz3D Forums/Blitz3D Programming/collisions?

(tu) sinu(Posted 2003) [#1]
why is it that if the movement is too small yet there is a collision that it does not register, my character has different speeds yet if he walks into a wall the collision normals remain zero even though he's colliding, yet if i jog into the wall it registers.
Causing a big pain in my butt cos it's messing with my jumping stuff among others.


Gauge(Posted 2003) [#2]
Not sure...perhaps its not clearing, or checking collisions when changing animation? Double check your loop? Or which type of collision method are you using? Does your mesh have more then one collision type/surface? good luck, post some code if you' like, i might get to take a look...take out the good stuff you don't want anyone takin though...or you can be nice and send me a copy to mboruta6@... *smile* I'd love to see someone elses 3d work. Well good luck.


lecks(Posted 2003) [#3]
i can't say i'll be the one to answer your question, but i can say you'll probrably need to be more specific for anyone to be able to help you. people cant assume how your 'walking', 'jogging' and 'jumping' works, nor what collision detection method you're using.
trust me, i've asked/answered alot of questions before, people want details :)
ps. gauge i love your movies (i know what im talking about)


(tu) sinu(Posted 2003) [#4]
im using sphere to poly collision and when i say walk, my entity moves forward at about .2 when walking , for the other animations ie jog, run etc the movement is .5+

i was using this to test it.

if entitycollided(player,wall)

CollNormalX# = collisionNX(player,1)
CollNormalZ# = collisionNZ(player,1)

else

CollNormalX# = 0
CollNormalZ# = 0
endif

if i stick my walk movement speed above .4 then it works fine, anything below and the collisionnormals don't register.
However if i do this it messes my walk up and i will need to rescale everything again(too much to do for just my walk), however im think if i scale everything up i'll get the same problem.


"ps. gauge i love your movies (i know what im talking about) "

so do i :)


Gauge(Posted 2003) [#5]
my movies??
oh, and i'm still trying to figure out why your movement won't register...hrrrm


lecks(Posted 2003) [#6]
I have to say i dont really know anything about this, but are you using real numbers? because the change is at .4, it could be rounding to 0 until it hits .5, then rounding up to 1.

i'd try making them real numbers, if theyre not already :).

but what do i know.. i'm a self-proclaimed noob, the worst type :)


Ken Lynch(Posted 2003) [#7]
Your variables don't have a # at the end.

By default blitz variables are integer, so you should have

ColNormal# = CollisionNormalX(player,1)
ColNormal# = CollisionNormalY(player,1)


Else you will get rounding to the nearest integer, which for 0.4 is zero.


(tu) sinu(Posted 2003) [#8]
just edited my post, those are already floats.

just to make my problem clearer.
You have your player and a wall in front of him.
Your player moves at a rate of 1 into the wall.
The collision normal will change to 1.0 for the z vectoer
i can do the same for .9 down to .5 and it still registers, anything below and the player still collides with the wall but the collision normal reads 0.0


Gauge(Posted 2003) [#9]
Are you perhaps "moving" the char model first then, updating it? I'm willing to bet this is whats going on. I think your character when running, attempts to move far enough into the wall to register a collision. Right now, I think that you move your char first, then its animated, so when the character moves (and possibly checks for collison now) it then animates the char, and whichever way its working, either it'll screw up the animation sequence cause it'll only allow the pivots to rotate so far, or it just won't count a collision only for animation, ie after the char has moved. Oh well, just a thought.

Animate it first, then move it/rotate it/etc. I think this should fix the problem. Lemme know if it doesn't.


(tu) sinu(Posted 2003) [#10]
still doesn't register, anyway doesn't matter now i found a much better way around it.


Gauge(Posted 2003) [#11]
cool, care to fulfill our intrigue?