Page MenuHomeFeedback Tracker

dBodyApplyForce does not work with dBodySetMass
New, UrgentPublic

Description

Hello,
The mass of the model is 6200.
Found such a problem when
changed the mass of the model according to the script through dBodySetMass (1500).
when performing the dBodyApplyForce function, which takes into account dBodyGetMass, the model did not take off, but when performing dBodySetMass (6200) everything is perfect, there is an assumption that dBodyApplyForce does not take into account the mass change through dBodySetMass, since it takes the value of the base mass from the model.
If I misunderstood something, please correct me, thanks.

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 7
Category
General

Event Timeline

komer created this task.May 22 2020, 5:26 PM
Unknown Object (User) added a subscriber: Unknown Object (User).May 23 2020, 8:32 PM

dBodySetMass is not working, there's nothing wrong with dBodyApplyForce

dBodySetMass works fine. the mass changed when creating an object with a dBodySetMass(100), and this changed, with a small mass, the object quickly rolls over an uneven surface, etc.
dBodyGetMass also returns the desired result.

Both work fine for me.

Does this object inherit from ItemBase? I know setting the mass works for that

komer added a comment.May 24 2020, 4:32 PM

You should know that EnPhysics for ItemBase does not work right now (they wrote somewhere that they will fix it in 1.8), but it only works for the transport and player, maybe even for zombies and animals, but this has not been verified.

I use inheritance from CarScript.
and everything works, but changing the masa with dBodySetMass does not affect dBodyApplyForce, as I wrote above, there is an assumption that the base value from the model is used, and not with dBodyGetMass.

https://youtu.be/yxmBs-pLe6k

That sedan inherits from the script class itembase using a simulation of inventoryitem and at one point I also gave it a mass value of 10. Works fine for me in 107

I never tested with a CarScript as I never had a need to, I'll do so tomorrow, mass should change though so it's weird that it does not for you. How are you applying this force?

Possibly for you it's the wheel friction force preventing any movement until you reach the max brake force found in the wheel config of your vehicle?