About 'Deforming Meshes With Splines'!

  • What is a USplineMeshComponent?
  • Replacing the UStaticMeshComponent
  • Getting the spline tangents.
  • Tracing the spline.
  • Hiding extra meshes.

(Unique Video Reference: 20_AE_VR2)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

This one was super confusing to get through, possibly because I’m on 4.25 and there are bugs.

Basically, I could not get local coordinate space vectors from the USplineComponent no matter what. The results were always identical regardless of choosing local or world coordinate space:

	TeleportPath->GetLocationAndTangentAtSplinePoint(i - 1, StartLocation, StartTangent, ESplineCoordinateSpace::World);
	TeleportPath->GetLocationAndTangentAtSplinePoint(i, EndLocation, EndTangent, ESplineCoordinateSpace::World);

Later I ended up just inverse transforming from the TeleportPath’s transform:

		Obj->SetStartAndEnd(
			TeleportPath->GetComponentTransform().InverseTransformPosition(StartLocation),
			TeleportPath->GetComponentTransform().InverseTransformVector(StartTangent),
			TeleportPath->GetComponentTransform().InverseTransformPosition(EndLocation),
			TeleportPath->GetComponentTransform().InverseTransformVector(EndTangent)
		);

Again, maybe a bug as the interface has changed somewhat, but the code inside the various components looks fine and you can see the transforms being applied there depending on the coordinate space enum.

I was also momentarily confused by the choice of VRRoot as the attachment parent, glad you corrected that after the challenge slide but it would have been better before! In the course of my experimentation I had decided to attach to the RightController anyway…