Page MenuHomeFeedback Tracker

Problem with incorrect transport physics due to orientation change call
Awaiting internal Testing, NormalPublic

Description

Calling the script function SetOrientation(GetOrientation()) (or SetTransform(m) with CHANGED m[2]) inside OnUpdate()/EOnSimulate() results in an additional tick of the physical simulation, even if the orientation of the object is not changed.
This manifests itself as accelerated motion of the machine, with GetVelocity() or GetSpeedometer() showing the speed corresponding to what it would have been without calling the orientation function. It is also confirmed by natural distance speed measurement.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
22H2
Category
Engine
Steps To Reproduce

#ifdef SERVER
modded class CarScript
{

override void OnUpdate( float dt )
{
    super.OnUpdate(dt);
    this.SetOrientation(this.GetOrientation());
}

}
//Or
modded class CarScript
{
override void EOnSimulate(IEntity other, float dt)
{
super.EOnSimulate(other,dt);

    vector m[4]
    this.GetTransform(m);
    m[2] = this.GetDirection()
    this.SetTransform(m);
}

}
#endif

Additional Information

I also found a possibly similar report, but not described correctly or in enough detail.
https://feedback.bistudio.com/T172796

Event Timeline

Yuki added a subscriber: Yuki.Fri, Jan 31, 7:34 PM
suyami added a subscriber: suyami.Fri, Jan 31, 9:00 PM

I admit that I should have added the [DayZ Modding] tag. But now I can't find a way to add it.

Geez changed the task status from New to Awaiting internal Testing.Mon, Feb 3, 1:36 PM
Geez added a project: DayZ Modding.