Jump to content

new methods : AddLocalForce, AddLocalImpulse


photo

Recommended Posts

Posted

to use rigidBody.AddForce or AddImpulse with local offset you need to use

1. a radius, expressed in local coordinates

2. a force  vector expressed in world coordinates (please improve documentation on this is not very clear...)

so each time you want to apply a "local" force you need to transform the force in world coordinates by a matrix rotation. 

it would be nice to be able to add a local force and the matrix rotation is done automatically based on node.worldrotation

this would be easier to understand for many users and also have a slight performance improvement for C# as the rotation is done in C++

thanks

Fred

 

Posted

Hi Fred,

Yeah, that's we also want to improve, but we tied to the backwards compatibility. If we will fix AddForce it would break all the projects, but if we will add AddLocalForce it would conflict with other naming in the API (e.g. SetPosition / SetWorldPosition).

We will think how we can improve this in the future versions, maybe one-time API change will be less painful.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

  • 2 years later...
Posted
On 11/23/2020 at 5:36 AM, silent said:

Hi Fred,

Yeah, that's we also want to improve, but we tied to the backwards compatibility. If we will fix AddForce it would break all the projects, but if we will add AddLocalForce it would conflict with other naming in the API (e.g. SetPosition / SetWorldPosition).

We will think how we can improve this in the future versions, maybe one-time API change will be less painful.

Thanks!

Any news on an update regarding this?

×
×
  • Create New...