Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Teleporting Characters with Solver
#1
Hello, I have a character with solvers under it.
The character needs to be able to teleport freely in the world.
At the moment the ways character are spawned is at World Origin and then Teleported to the designated location.
What would be the best way to allow teleportation.
The Solver is set to gravity "World Space" and the whole prefab is being Teleported with the solver somewhere inside it.

Best Regards

Thomas P.
Reply
#2
We also have some enemies with Pipes dangling from it. The normal spawn and Teleportation close to Origin didn't create any problems. But Teleporting stuff across the map breaks everything at the moment.
Reply
#3
(20-03-2023, 06:12 PM)masamoto Wrote: We also have some enemies with Pipes dangling from it. The normal spawn and Teleportation close to Origin didn't create any problems. But Teleporting stuff across the map breaks everything at the moment.

Hi!

If your character contains a solver, setting the position/rotation of the character will also set the position/rotation of all Obi actors in it, since actors are simulated in the solver's local space. No need to explicitly call Teleport() on the actors.

This also prevents any floating-point precision issues when characters are far away from the scene's origin, since the coordinate system used for simulation is relative to the solver, not the world's origin.

kind regards,
Reply
#4
(20-03-2023, 10:11 PM)josemendez Wrote: Hi!

If your character contains a solver, setting the position/rotation of the character will also set the position/rotation of all Obi actors in it, since actors are simulated in the solver's local space. No need to explicitly call Teleport() on the actors.

This also prevents any floating-point precision issues when characters are far away from the scene's origin, since the coordinate system used for simulation is relative to the solver, not the world's origin.

kind regards,
That is the exact Issue at the moment.
I have the character Root that get's Teleported. Under it nested is the Obi Solver and the Obi Rods/Ropes. During the teleportation (which at the moment we don't call Teleport)
All obi simulated things inherit the velocity and take a while to settle again.

kind regards,
Thomas
Reply
#5
(23-03-2023, 10:36 AM)masamoto Wrote: That is the exact Issue at the moment.
I have the character Root that get's Teleported. Under it nested is the Obi Solver and the Obi Rods/Ropes. During the teleportation (which at the moment we don't call Teleport)
All obi simulated things inherit the velocity and take a while to settle again.

kind regards,
Thomas

You can control how much world-space velocity actors inside a solver inherit by setting the solver's world linear/angular inertia scales.

A simple solution is setting them to zero before teleporting, then setting them back to their original values one frame after.
Reply