Skip to content

How to implement door/elevator "squish" behavior? #24

Answered by RossNordby
demiurghg asked this question in Q&A
Discussion options

You must be logged in to vote

One approach would be to examine the accumulated impulses associated with the contact constraints on the kinematic elevator. If contact contact constraints are applying a lot of force to the kinematic, it is probably squishing something (or the object's just very heavy). You could stop the kinematic's progress or even reverse it a little bit in response.

After a little while of not detecting the excessive impulse, you could return it to the usual movement pattern.

You could also make the elevator a dynamic body with constraints that make it act elevator-y; the motor raising and lowering the elevator could be given a maximum force that doesn't make it smash stuff through walls. Depending o…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@demiurghg
Comment options

@RossNordby
Comment options

@demiurghg
Comment options

Answer selected by demiurghg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants