Forums Archived

The forums are being archived. See this topic for more information.

Collision with a tree????

Get help and support with Rubygame

Collision with a tree????

Postby programx » Fri Nov 05, 2010 5:12 am

Hi all, I am making a rpg in this library which I think is wonderful, the problem is in the collisions. I try to collide with a tree (rectangle) with my character (another rectangle) but in all directions, ie to make the tree is a rectangle impenetrable, that my character to collide with any side of the tree can not move, the tree just will be static and my character can not step over it.

I'm using the method collide_rect?. Any help?.

Sorry for the bad English :)
User avatar
Posts: 3
Joined: Fri Nov 05, 2010 4:55 am

Re: Collision with a tree????

Postby shawn42 » Sun Nov 07, 2010 7:11 pm

I have implemented 2D sparse grid collision detection in gamebox, maybe looking through that code could help. Also, if you post a link to your code I can take a look. And welcome to Rubygame.

User avatar
Posts: 109
Joined: Tue Feb 10, 2009 8:22 pm

Return to Help & Support

Who is online

Users browsing this forum: No registered users and 1 guest