#Why the camera captures exactly the legs, regardless of the model ?
1 messages · Page 1 of 1 (latest)
With the setup you have here you'll have two components that try to write the position of the object:
- SmoothFollow: interpolates the GameObject you put it on to the Target object that you assign
- OrbitControls: does take the camera object that you put it on and makes it controllable by mouse and touch input.
If you want to combine the two then try putting the camera in a parent and add the SmoothFollow to the parent (and remove it from the camera)
- Camera Parent (SmoothFollow)
- Camera (Camera, OrbitControls)
Is there any way I can change this in the code?
Create your own script and work with the camera.
Yes sure, you can create custom components: https://engine.needle.tools/docs/scripting.html
Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development, and can be deployed anywhere. It is flexible, extensible, and collaboration and XR come naturally. Needle Exporter for Unity bridges the Unity Editor and the web runtime. It helps you to export your assets, animations, lightmaps and so on to the web. It is...
Because the lookat constraint is set to this object (I guess in Constraint Settings it's also set to "Lock" ?)
But is there an example of working with the camera when using scripting?
you can open and look at the code here for example:
yeah ((
Where can I find such a prototype?
and I can write a script under Three.Js, and then process it. I was told that needle - tools is Three.Js, but with convenient abstractions. That is, I can't write like normal Three.Js using typescript ?
What do you mean by "I cant write like normal three.js using typescript" ? You can do exactly that still
A controller like that will be part of the core components eventually. It's not released yet.
Here's a minimal example using move to click: https://stackblitz.com/edit/needle-engine-move-camera-onclick?file=src%2Fmain.ts
that is, I can write tasks as I usually write in Three.js ?
You can
When you use components then this.gameObject is just your three.js Object3D (or mesh or...)
Maybe this helps you: https://engine.needle.tools/docs/getting-started/for-unity-developers.html
Thanks
I guess you're more familiar with three.js then? 🙂
I am an unity developer😅
can you give me a test controller? I want to poke
preferably the project itself
The code looks something like this (it's not the latest version but should perhaps help you getting started). I can not share the project
You need to modify the imports to use it in your own files (all should be importable via import { ... } from "@needle-tools/engine")
Thanks!