-
Notifications
You must be signed in to change notification settings - Fork 886
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
base: master
Are you sure you want to change the base?
Conversation
e02c17b
to
b041073
Compare
…e object angle directly.
|
||
aut | ||
.addScopedAction( | ||
'SimulateForwardKey', |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 = { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe Physics3DContext
?
// 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). |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
Demo