#Working Directly with LTW & LTP

1 messages · Page 1 of 1 (latest)

normal cairn
#

It’s a new project. I am using default DOTS Physics, and will be switching to Havok in the next minor version.

obtuse lichen
#

i dont remember for static physics but kinematic and non kinematic rigidbodies dont use ltw or ltp(nor any other extended transform system components)

modern jackal
#

@normal cairn Do the raycast not hit anything at all, or perhaps they see the colliders in their previous locations (as in; they happen against a cached "snapshot" of the scene or something)?

normal cairn
normal cairn
#

I'm pretty sure it detects the floor as a raw hit, but my code filters that out. If you want, I can slap a Debug.Log and see if it does hit the floor if that's what you really need to quench your curiosity. I'm betting it will detect floor hit though.

obtuse lichen
#

the easiest thing would be just to use translation and rotation for anything physics related. I have some parent child stuff with physics(ragdoll tests)but it means that rigidbodies are still unparented in world space but get their translation and rotation set from the entity they are meant to be parented from in a separate job.

modern jackal
#

@normal cairn
This is from updating a Rigidbody's RigidTransform (presumably used for final Collider TRS calculation).
To define this RigidTransform, it seems that Translation and Rotation are used only if present. Otherwise, LocalToWorld is used.

#

Perhaps you need to take into account that all RigidTransform-components have finished updating as well.

#

I'm just guessing though. But maybe this helps provide some insight

#

Note that for parented Rigidbodies, only LocalToWorld is used.

#

Otherwise, whatever the last value was of 'worldFromBody' is assigned, apparently? 🤨

#

That last one is a bit suspicious, but based on your story you should not be affected by this. Perhaps worth double-checking, though.

#

(screenshotted code location: Unity.Physics --> BuildPhysicsWorld.Jobs.CreateRigidBodies)