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
Point & Click Placement Mode #10042
base: dev
Are you sure you want to change the base?
Point & Click Placement Mode #10042
Conversation
@@ -49,4 +58,17 @@ export const serializeEntity = (entity: Entity) => { | |||
return jsonComponents | |||
} | |||
|
|||
export const toEntityJson = (entity: Entity) => { |
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.
I'm worried about learning on serializing the simulation layer into the authoring layer, as it will be serializing simulation side effects (such as physics simulation, runtime entities, visual script mutations etc).
Rather than this, we should
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.
Yes if this function is used incorrectly it could end up capturing side effects, but there are many cases where just fully serializing an entity is the correct course of action. We should have this function available for those cases. I'm using it in the click placement system to add the placement entity to the authoring layer, since it does (and should) only exist in the simulation layer up until the click placement event. In that case, the entity is guaranteed to only be a model component and a transform component which should be serialized directly from their runtime values, and this function is correctly called in that case.
add rotation hotkeys (E and Q) fix integration with object grid snap system
25a5da9
to
a1c983d
Compare
const sceneObjects = objectLayerQuery().flatMap((entity) => getComponent(entity, GroupComponent)) | ||
//const sceneObjects = Array.from(Engine.instance.objectLayerList[ObjectLayers.Scene] || []) | ||
const camera = getComponent(Engine.instance.cameraEntity, CameraComponent) | ||
const pointerScreenRaycaster = new Raycaster() |
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.
we should be using spatial input here, rather than a custom raycaster
…ystem to use new apis
failing checks & tests |
…cks for child entities having a transform component
Adds point & click mode for asset placement