Hey all, I'm looking for help on a 360 engine that resembles the "Race Car Movement" that’s built into TGF/MMF, but my biggest issue at this point is getting collisions between the object and the actual wall, correctly. I need it to be able to collide with walls of various and random angles, no straight lines, and no right angles limitations. I have the basic 360 movement down, but I cant for what ever reason, seem to get a smooth collision where you can hit slightly, and not bounce, but if you hit hard enough, you bounce away a short distance.
Anyone think they'd be able to help? I'll upload what I have so far (working 360 movement) if anyone wants to check it out, fully commented. Thanks.
360 movement would be newX = X + cos(angle) * speed ; newY = Y + sin(angle) * speed
where left and right rotate the angle forward increases speed and back decreases speed. and the speed would be in pixels.(speed=1 move 1 pixel in the direction of the angle, speed=2 move 2 pixel in the direction of the angle, and so on)
ive never implemented it in tgf or mmf so i dont know if you can just use that (i dont know what they use, radians or angles). i use that in my games programmed in Basic.
I already know how to do the 360 movement itself, as I have already said in my post (read past the title of my post!) I need to know how to do collisions not the actual 360 movement. I'm talking about a real collision, where the fast you hit the wall, the more force you get tossed back, and the hit that resembles reflection, in the since that when you hit the wall going north east, you don’t suddenly go south west, you go north west, unlike TGF/MMF's bounce movement.
Edit: I'll upload what I have so far, once I'm back on my computer (posting from school.)
Peblo Custom ratings must be 50 characters or less
Registered 05/07/2002
Points 185
31st March, 2006 at 15:57:46 -
That is assuming you want to give an angle value to every obstacle. Or you can use raw data stored in an array (endpoints of wall), some stuff with tangent*-1, and run a fastloop to check your current position with wall data.
Axel: There you go, I guess?
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath