Physics object "bounce"

For questions about using Classic.

Post » Wed Mar 24, 2010 6:58 pm

I'm a little hesitant to post a new topic, 'cause my problem seems simple enough that I'm surprised I haven't found a solution in the forums. It doesn't seem to be here yet though, so:

My game involves a hammer being thrown around by the player, which works fine using the physics behaviour and some "add force" events, but my problem is that the hammer passes straight through solid objects.

The only solution I can think of is to destroy the hammer on impact and replace it with a static sprite, but what I really want is for the hammer to bounce around a little before coming to rest, which I can't figure out how to do with the physics behaviour.

Any help / suggestions would be great.
B
1
G
2
Posts: 7
Reputation: 639

Post » Wed Mar 24, 2010 7:14 pm

Physics objects only see physics objects. you'll have to make everything immovable (physics) for it to react to them. Or fake it with events.
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Wed Mar 24, 2010 7:43 pm

I've tried adding the physics behaviour to all the other solid objects, but that makes the player slide slowly to the left for reasons I don't hope to understand. :?

I've heard (read) mention of people faking platform behaviour with physics and events, would that be doable/easier than faking the bouncing itself?
B
1
G
2
Posts: 7
Reputation: 639

Post » Thu Mar 25, 2010 12:03 am

[quote="YetiSeekingYeti":30magxiv]I've tried adding the physics behaviour to all the other solid objects, but that makes the player slide slowly to the left for reasons I don't hope to understand. :?

I've heard (read) mention of people faking platform behaviour with physics and events, would that be doable/easier than faking the bouncing itself?[/quote:30magxiv]

I've heard a few times that physics for platform games (while possible) isn't recommended. Faking the bounce would probably, ultimately, be less hassle.
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Thu Mar 25, 2010 6:33 pm

Alright, I'll try that. Thanks :) .
B
1
G
2
Posts: 7
Reputation: 639


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest