#Physics colider origin
1 messages · Page 1 of 1 (latest)
float3 directionToCenter = hitPosition - SelfPosition;```
this is what i have right now but it assumes collider radius is 0.5.
I can assume all colliders are capsules
Anyone?
not exactly sure what you're looking for tbh
you want the position of the collider that hit you?
DistantHit has a RigidBodyIndex
and you use use the RigidBodyIndex to get rigidbod from the phyiscs world
yes
Is it cache friendly? probably not, right?
well...
most of the data is already going to be in the cache considering it was just used to create the collision
With just rigidbody i can`t get origin, right?
I need entity lookup probably
I found world from body hmm
why not?
physics only uses the data in the simulation
i imagine knowing position is important and should be accessible
Yes, i found it under rigidbody WorldFromBody property
Ty
Is it the best way for performance?
It will run a lot of times (using for AimAssist code)
yes