Hi Guys,
Is there any possibility to create a object, and make this object follow the movement of the default perspective camera?
eg, a cross object always at the middle of the viewport, and i can click it as a touchsensor.
As of VRED 2017 SR1 you can just put it as a child of the camera. Not sure if this works with previous versions though.
I mean 2017 SR1 (Subscription Release), not SP1.
OK, thanks. But unfortunately, my client is still using VRED 2015, is there any way to do this?
Hello Everyone...
This subject is so close from my question... so I prefer to post it here than into a new post.
Based ont the "Camera-fixed-object2.py" exemple in Vred 2017.0.2 Update, I'm trying to make some little changes into the script.
In fact I would like to have a Plane, always in the center of the world, always looking at the camera.
Is this possible to do so?
How to fixe the position of the plane, and to define a rotation axis for it?
I'm kind of a newbie in scripting, so a little help will be welcome.
Thank tou for your answers
Yes, create a Billboard node and attach a Plane to it.
A Billboard node will always face the camera.
You may need to rotate it 90 degrees depending on what axis is up in your scene.
Regards,
Dan
Hi Dan,
Thank you for your answer, it works great... but it is not enought for my project, in fact with a Billboard Node, the plane is always looking to the camera, but it is not rotating depending of the camera position on the Z axis...
If my Camera is under the plane, the plane is rotating only on the Z axis.... and I would like it to rotate on the two other axis too, depending of my camera position on the Z axis.
Am i clear enought?
Ok, based on the example script, this is a way to do it.
Using a "Plane" as the obj
camera_matrix = self.camera_node.getWorldTransform()
camera_matrix[3] = 0
camera_matrix[7] = 0
camera_matrix[11] = 0
self.camera_transform.setTransformMatrix(camera_matrix, false)
obj = findNode("Plane");
obj.makeTransform()
Thanks a lot!
I also have a problem: Can we make the billboard or anything else always visible in the scene? Just like setOculusRiftPerformanceHUD(1) or the Transform Manipulator axis.
Can't find what you're looking for? Ask the community or share your knowledge.