![]() |
|
Suggestion / Idea ECS Physics/Graphics Support - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: General (https://obi.virtualmethodstudio.com/forum/forum-5.html) +--- Thread: Suggestion / Idea ECS Physics/Graphics Support (/thread-4615.html) |
RE: ECS Physics/Graphics Support - Jawsarn - 17-05-2026 (17-05-2026, 09:21 AM)josemendez Wrote: If I understood your code correctly, you're calculating velocity from the solver's world space positions in the previous/current frame (totalVelocity), then calculating its velocity in local space (velocityFromLocal) and subtracting them to get velocity due to the parent's movement (velocityFromParent). Yes, I think you fully understand. My goal is to drastrically reduce the inertia forces from velocityFromParent and angularVelocityFromParent.(17-05-2026, 09:21 AM)josemendez Wrote: The solver's linear velocity is transform.position - prevTransform.position. To be consistent we have to calculate angular velocity using backward finite differences as well, and that means using an r vector that's also expressed in the previous frame's space. So you mean this is just possible inaccuracies because how we are stepping in time? Are you sure we should not use prevFrame here instead when we get wPos? It feels weird to express the point in the current frame, but then use previous frame center to get the vector. Code: float4 wsPos = inertialFrame.frame.TransformPoint(positions[i]);Thanks RE: ECS Physics/Graphics Support - josemendez - 20-05-2026 (17-05-2026, 12:02 PM)Jawsarn Wrote: Are you sure we should not use prevFrame here instead when we get wPos? It feels weird to express the point in the current frame, but then use previous frame center to get the vector. Yes, but that's the correct approach afaik. RE: ECS Physics/Graphics Support - Jawsarn - 18-08-2026 Hey! Just a small nit pick. I just noticed that the ObiSolver.Render() uses hardcoded Time.fixedDeltaTime, it would be great if that's a paramter instead for manual execution similar to StartSimulation. Thanks RE: ECS Physics/Graphics Support - josemendez - 22-08-2026 (18-08-2026, 10:13 AM)Jawsarn Wrote: Hey! Just a small nit pick. I just noticed that the ObiSolver.Render() uses hardcoded Time.fixedDeltaTime, it would be great if that's a paramter instead for manual execution similar to StartSimulation. Sure! Just added stepTime as an extra parameter to Render(). |