Community
VRED Forum
Welcome to Autodesk’s VRED Forums. Share your knowledge, ask questions, and explore popular VRED topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Object follow camera

9 REPLIES 9
Reply
Message 1 of 10
Anonymous
1272 Views, 9 Replies

Object follow camera

 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.

9 REPLIES 9
Message 2 of 10
michael_nikelsky
in reply to: Anonymous

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.



Michael Nikelsky
Sr. Principal Engineer
Message 3 of 10
Anonymous
in reply to: michael_nikelsky

Hi, You mean SP1? I tried, but this doesn`t work.

Message 4 of 10
michael_nikelsky
in reply to: Anonymous

I mean 2017 SR1 (Subscription Release), not SP1.



Michael Nikelsky
Sr. Principal Engineer
Message 5 of 10
Anonymous
in reply to: michael_nikelsky

OK, thanks. But unfortunately, my client is still using VRED 2015, is there any way to do this?

Message 6 of 10
Anonymous
in reply to: Anonymous

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

Message 7 of 10
dlincol1
in reply to: Anonymous

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

 

Regards,
Dan
Message 8 of 10
Anonymous
in reply to: dlincol1

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?

Message 9 of 10
dlincol1
in reply to: Anonymous

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()

Regards,
Dan
Message 10 of 10
Anonymous
in reply to: dlincol1

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.

Post to forums  

Autodesk Design & Make Report