Okay. So this is a pretty cool project. How can make my changes preserved for any testing?
by user 553297758795333647
Okay. So this is a pretty cool project. How can make my changes preserved for any testing?
by user 553297758795333647
What do you exactly have in mind?
Are you asking how you can edit the sample?
Or how to edit a engine component?
so for instance in the raycaster.ts I wanted to uncomment the console.log, when I was trying to figure out this ui issue.
export class ObjectRaycaster extends Raycaster {
private targets: THREE.Object3D[] | null = null;
private raycastHits: THREE.Intersection[] = [];
start(): void {
this.targets = [this.gameObject];
}
performRaycast(opts: RaycastOptions | null = null): THREE.Intersection[] | null {
if (!this.targets) return null;
opts ??= new RaycastOptions();
opts.targets = this.targets;
opts.results = this.raycastHits;
const hits = this.context.physics.raycast(opts);
// console.log(this.context.alias, hits);
return hits;
}
}
by user 553297758795333647
You can do edits in the already compiled lib/.js files for testing/experimentation, but we’re not generally supporting that workflow.
Source code access with support is an enterprise feature, since there are so many details regarding you modifying source and then wanting to update to later versions.
Typically you’ll have your own components that you’re editing. Since it’s all Javascript you can also patch methods in the core if needed.
I’m having a similar issue in the project from the react repository in the needle-engine org, which I think has an identical scene to the Sandbox project. The button I’ve added can be highlighted, but not clicked. I’ve tried to set it up like the canvas UI sample project, except the using screen space instead of world space. I made sure to add a GraphicRaycaster to the canvas, and a StandAloneInputModule to the EventListener. I also deleted all the networking stuff outside of the Content GameObject to see if that would change anything. The one thing thats different from @Sinful Spartan as far as I can tell is there’s no DragCOntrols.ts script in the scene.
by user 216692838757433347
Hi, I’ll take a look at this now
The problem is related to a large distance between near and farclip plane where the UI ends up behind the geometry (in the scene) - this is a bug in the UI system and I’ll look further into it but just as a quick workaround would be (if possible) to reduce the farclip plane to a reasonable distance (by default it’s 0.1 - 1000 in the sandbox scene which leads to this issue)
The problem doesnt exist with something like 0.1 - 30
This should be fixed in the next version
@dubbies the latest version should fix the problem 3.19.1