Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Obi Rope for VR
#4
(26-10-2022, 01:49 PM)DulcetTone Wrote: This answer puzzles me.
Is it not the case that physics are being calculated by extrapolating motion between the present position and previously stored positions? 

What I mean is that naively "teleporting" a physics object -that is, setting its transform position directly- will not work the expected way, regardless of which paradigm your engine uses (position or velocity based). There's usually specific API methods that take care of modifying the internal physics state in a way that's consistent with teleportation.

In a position-based engine, a new velocity will be calculated as (positionIveBeenTeleportedTo - myPreviousPosition) / deltaTime, which will add spurious acceleration to the object. If you move the object far enough from its previous position, the resulting acceleration can be huge. The solution to this is of course to modify both the actual and the previous position.

(26-10-2022, 01:49 PM)DulcetTone Wrote: If so, can't any a "broken" teleport system be fixed by tweaking the positions in the stored state data to render the teleport invisible to the physics code?

Yes, that's exactly what ObiActor.Teleport() does. Quoting my previous post:

Quote:For teleporting a dynamic object, you usually need to call a specific method on it instead of just doing transform.position = something. [...] For Obi actors, you call actor.Teleport(), or set the position/velocity of individual particles using the particles API.
Reply


Messages In This Thread
Obi Rope for VR - by Holty - 15-10-2022, 07:03 AM
RE: Obi Rope for VR - by josemendez - 17-10-2022, 07:47 AM
RE: Obi Rope for VR - by DulcetTone - 26-10-2022, 01:49 PM
RE: Obi Rope for VR - by josemendez - 26-10-2022, 02:36 PM