Jump to content

Recommended Posts

Posted

Hello,

This is going to be hard to explain, but I need to parent a model to an entity that I want hidden in-order to get custom VR models to work correctly. The issue is tjhat when the parent is hidden, all of it's children are forced hidden as well. There is a rubber band effect when you just apply the the parent's matrix to the child's matrix every frame.

	// Update The model to the controller's matrix
	if (m_pControllerA != nil)
	{
		m_pControllerA->SetMatrix(VR::GetControllerModel(m_intControllerA)->GetMatrix());
	}

	if (m_pControllerB != nil)
	{
		m_pControllerB->SetMatrix(VR::GetControllerModel(m_intControllerB)->GetMatrix());
	}

When it is parented to the controller, the models are one-to-one and there is no delay.My question is how do I mimic the matrix updating without actually doing any parenting?

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Posted

Yeah, now that I think about it, I had a similar issue trying to position and rotate a camera behind a player.  I only solved that by parenting the camera (which I know is not an option for you).  One other possibility: have you tried calling world->Update() after the SetMatrix function?  Seems like Leadwerks needs to catch up on positioning and that might do it.

  • 1 month later...
Posted

Apply an invisible material to the parent. It’s a blend setting. )

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

The controller may be NULL until it loads in. Make sure it exists before you apply the material.

My job is to make tools you love, with the features you want, and performance you can't live without.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...