simple question prolly

(macouno) #1

I’ve been doing quite a bit in blender and the realktime engine has always interested me… though I’ve never really done anything with it.

My problem is with collisions I think.

So I’m trying to make the simplest possible (well almost) racer I can think of… just a flat track with some walls on the sides. Easy peasy no?

But now why does whatever I create as a racer allways end up going right through the track’s walls and falls into nothingness??? it usually bounces off a few times rather nicely but then at some point… usually at odd angles, it’s as if the wall isn’t there… que pasa???

(Pooba) #2

what kind of movement are you using? In the motion acuator, there is force, dloc, and linV. Dloc goes through walls a lot, so if you’re using that…


(Klein) #3

i have the same problem.
It often is because ur object is too fast .
Blenders collisions detection sucks, i have noticed that already.
Maybe try to seperate the walls from the ground and give the walls a restitude of 1(full restitude) at the materials.

(macouno) #4

yah I was using dloc …

I’ll try both solutions… it really only seems to happen with vertical walls too… if I make them at an angle it’s not as bad. though the “vehicle” (just a cube for now) climbs up and over them hehe

(saluk) #5

Yeah, the reason it is only going through vertical walls, is because the force you are applying is HORIZONTAL. The downward force caused by gravity just isn’t hard enough to push you through the floor. When you think about it, each frame you are applying force, it moves you forward, and then checks for collisions. If you move it fast enough that on one frame it’s on one side of a wall, and the next frame it’s on the other side, then when it checks for collisions it wont find any and youll go right through.

This is why collision detection works better on faster computers, because at a higher framerate there is less of a chance that there wont be that frame where the object is inside the wall so that collision detection can push it back out again.

(macouno) #6

So actually for a tiny racing game like this it might be best to make walls like <> sorta in stead of [] hmm can be done… I’m jsut trying it out anyway.

(saluk) #7

Another thing to do is to make the scale of everything smaller - shrink your car, shrink your world, and put the camera closer to the car. Then shrink all your force amounts until it seems to fit. A smaller scale can handle collision detection quite a bit better. Although it still doesn’t work well at high speeds.

(macouno) #8

Well it seems to work ok… made the walls a sepparate mesh, placed them at an angle, made a colission sensor that locks the ehhh Y motion I think… which stops it bouncing around… which helps a bit but doesn’t make for smooth play really.

But really… i dunno… I think making images and animation is really more my thing. I’m afraid I’ll stick to that. hmmm I’ll keep trying for a bit though.

(Pooba) #9

just mess wtih stuff a lot, that’s how i learned. Try to troubleshoot, try different ways, different kinds of force, and look at other peoples files. Don’t give up!