Game Development Community

Collision on a "ramp

by Kiyaku · in Torque Game Builder · 06/25/2007 (3:04 pm) · 2 replies

Hi,

how can i move up "ramp"-like objects with the collision detection?

Here a example picture:

[img]http://www.windmillgames.com/collisionup.jpg[/img]


I want to walk up this right ramp. I tried to do it with physics, or just set linearvelocity-y to 10 and when i collide to 0. But how can i move up it then?


Thanks in advance!

#1
06/25/2007 (7:10 pm)
Look at the platformer tutorial on TDN for information on how this might be accomplished (the end of the tutorial makes mention of this I believe). Essentially, if you're using the platformer tutorial code there's a few things to watch for including the use of angled collision polygon bases (make angled corners as if you folded in the corners of a piece of paper). If you haven't looked at the tutorial code, take a look-see. It has some issues but it's been/being looked at by lots of people and has had most of the issues ironed out already.

Hope that helps.
#2
06/29/2007 (5:35 am)
Kiyaku use [image] instead of [img] to upload an image in these forums.


www.windmillgames.com/collisionup.jpg