Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

RFC: EMI: Check for collisions when using updateWalk(). #1050

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JoseJX
Copy link
Contributor

@JoseJX JoseJX commented Aug 18, 2014

This forces a check for collisions when updateWalk is called. This fixes Timmy running through the legs of Guybrush on the beach in the set mib. I think it fixes the logs in the flume puzzle as well, but I need to finish with that PR first to be sure since they're not visible right now.

@klusark
Copy link
Member

klusark commented Aug 24, 2014

I guess we don't need this in Grim as no moving actors collide with Manny?

@somaen
Copy link
Member

somaen commented Sep 9, 2014

That depends, that monster/car-puzzle might be doing some collisions like that. But largely anyone that's not Manny, doesn't really move much at all in Grim. (Which is mostly true in EMI too, apart from the wandering tourists, Jimmy and perhaps the logs in the lava puzzle?).

@aquadran
Copy link
Member

aquadran commented Sep 9, 2014

so we wait for testing this?

@klusark
Copy link
Member

klusark commented Sep 9, 2014

I wanted to wait for the log puzzle to be fixed first. I think it's still not visible (but I haven't checked).

@aquadran
Copy link
Member

@klusark have you checked this?

@JoseJX
Copy link
Contributor Author

JoseJX commented Sep 13, 2014

We're still waiting on this for my fixes for rotation. I'm going to check some of the possible areas where this might be problematic in Grim too.

@aquadran
Copy link
Member

what is status on this?

@klusark
Copy link
Member

klusark commented Nov 30, 2014

I think this one may have been superseded by #1108, but that needs to be confirmed.

@chkr-private
Copy link
Contributor

This bug is still present:

#1108 only fixed the issue if an actor is moved via Actor::setPos().

Unfortunately, the proposed bug fix has the drawback that the moving actor does not try to avoid the object it collides with. This has the following two consequences:

  1. if Timmy tries to run into the direction of Guybrush (but can't because he would collide), then he hops up and down until another walk attempt with a random direction is initiated by the lua code and allows him to move
  2. when testing EMI: Guybrush walks through tourist body #1153 something similar happens
  • first place Guybrush on the right side of the tourist in front of the statue and try to talk with the tourist
  • Guybrush tries to move to the left side (there is a fixed point he is supposed to walk to), but he collides with the tourist
  • regardless if the code would avoid walking at all (as done in this patch) or with a modified patch where the actor would walk at least the returned amount from handleCollisionWith(), Guybrush would not move, but keep playing the walking sequence forever

@chkr-private chkr-private added EMI and removed EMI labels Jan 13, 2015
Math::Vector3d newWalkAmt = dir * walkAmt;
foreach (Actor *a, g_grim->getActiveActors()) {
// Don't move if we've collided
if(handleCollisionWith(a, mode, &newWalkAmt)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing a space after if.

@aquadran aquadran added the EMI label Aug 29, 2020
@aquadran aquadran changed the title EMI: Check for collisions when using updateWalk(). RFC: EMI: Check for collisions when using updateWalk(). Jun 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

None yet

5 participants