Thursday, July 21, 2022
HomeGame DevelopmentMaking a rigidbody pressure at world level - Cocos Creator

Making a rigidbody pressure at world level – Cocos Creator


Hello All,

I’m a bit confused by applyForce on rigidbody. The docs says it wants a pressure Vec3 and a relativePoint Vec3. I’m presuming the relativePoint is the place to use the pressure from. What I don’t perceive is what the pressure Vec3 needs to be? I’m additionally confused in how this works as if I do applyForce(new Vec3(10,10,10)) after which tried applyForce(new Vec3(10,10,10), vectorOfANode.node.getPosition)) and the node strikes. The pressure acts the identical as not supplying a realtivePoint and if the course of the node adjustments the course of the pressure doesn’t.

Can’t appear to know how that is working. If anybody can clarify and provides so examples it will be an enormous assist in making an attempt to know this.

Thanks,
-iDev


RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments