Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 3D physics and 3D character behaviors #7149

Open
wants to merge 73 commits into
base: master
Choose a base branch
from
Open

Add 3D physics and 3D character behaviors #7149

wants to merge 73 commits into from

Conversation

@D8H D8H changed the title Add a 3D Physics behavior Add a 3D physics behavior Nov 12, 2024
@D8H D8H force-pushed the 3d-physics branch 4 times, most recently from e02c17b to b041073 Compare December 2, 2024 14:43

aut
.addScopedAction(
'SimulateForwardKey',
Copy link
Owner

Choose a reason for hiding this comment

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

Open question: I wonder if we should have a single "SimulateKey" that takes a key as a parameter.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably at some point, but we can't remove or rename a choice from stringWithSelector without creating a new instruction so I prefer not to do it until we are sure about the controls.

props: PhysicsCharacter3DNetworkSyncDataType;
}

type Physics3D = {
Copy link
Owner

Choose a reason for hiding this comment

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

A bit of a strange name for a type and an object no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe Physics3DContext?

@D8H D8H changed the title Add a 3D physics behavior Add a 3D physics and character behavior Dec 11, 2024
@D8H D8H changed the title Add a 3D physics and character behavior Add 3D physics and 3D character behaviors Dec 11, 2024
@D8H D8H marked this pull request as ready for review December 11, 2024 17:31
// It's possible the behavior was either deactivated or the object deleted
// just before this doStepPreEvents (for example, another behavior deleted
// the object during its own doStepPreEvents). If the body is null, we just
// don't do anything (but still run the physics simulation - this is independent).
Copy link
Owner

Choose a reason for hiding this comment

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

The parenthesis comment is useless now. And in 2D only, since you've reworked how this code works

physics3DHook.doBeforePhysicsStep(deltaTime);
}

const numSteps = deltaTime > 1.0 / 55.0 ? 2 : 1;
Copy link
Owner

Choose a reason for hiding this comment

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

Do we support 2 steps at once? I'm surprised

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants