Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Physics question..

Author
Message
Jogimus
12
Years of Service
User Offline
Joined: 10th Nov 2012
Location:
Posted: 25th Nov 2012 15:40
I'm trying to get car physics to work, and problem is this:
- I create rectangle (car base plate) and I'll attach 2 wheels to it (CreateRevoluteJoint) -> works ok.
- Then I create car main chassis and attach base plate to it with 2 CreatePrismaticJoint (to get nice suspension for car)

However chassis and wheels collide to each other and I would like them no to collide so wheels could freely move up/down.. any idea how to let all parts to collide with the world but not each other (chassis and wheels..)
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 25th Nov 2012 17:54
Yes, just use setSpriteGroup using the same negative group number for all the sprites you don't want to collide with each other.

When you create a joint there is also an option to not let the two connected objects collide by setting 'collide connected' to zero.


this.mess = abs(sin(times#))
Jogimus
12
Years of Service
User Offline
Joined: 10th Nov 2012
Location:
Posted: 25th Nov 2012 19:59
Thanks, that worked fine, back to testing car physics

Login to post a reply

Server time is: 2024-11-24 04:35:58
Your offset time is: 2024-11-24 04:35:58