Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the role of Shape Matching Constraints?
#6
(27-11-2023, 04:53 PM)KBTIT_ Wrote: The solution to this problem is simple: simply wait in front of Teleport as shown below. However, this is not preferred.
Code:
yield return new WaitForSeconds(1.0f);
How do I resolve this ArgumentOutOfRangeException error?

Hi,

You can't Teleport() an actor that hasn't yet been loaded in the solver. You must wait for it to be loaded, either by waiting one frame or by subscribing to the actor's OnBlueprintLoaded event. Note that you can use actor.isLoaded to check whether the actor has had its data loaded on the solver or not.

Also note that there isn't any need to teleport the actor right after instantiating it. Simulation hasn't started yet, so you can just instantiate it in the correct position/orientation by modifying softbody.transform directly.

kind regards,
Reply


Messages In This Thread
RE: What is the role of Shape Matching Constraints? - by josemendez - 27-11-2023, 05:19 PM