Tuesday, November 8, 2022
HomeGame DevelopmentPhysics 2D assist - Cocos Creator

Physics 2D assist – Cocos Creator


Hi there,
I’m attempting so as to add some fundamental 2Dphysics to my sport however I believe I’m doing one thing fallacious because it’s not working as anticipated.

I’ve a easy sprite body inside a canvas, connected inflexible physique + collider and nothing is occurring, I might count on the sprite to fall down or one thing. On prime of that mass appears to be at all times 0, regardless of the values I can put in density/measurement.
If I add any velocity, it gained’t transfer both (i assume trigger mass is 0?).
PhysicsSystem2D.occasion.enabled is ready to true by default it appears however I additionally compelled it simply in case.

Any thought? (utilizing cocos creator 3.6)


what you imply of fall down ? perhaps you possibly can check with this to get what can do with physics : GitHub – cocos-creator/cocos-example-physics: Samples for 3d physics

I can verify it’s the preview editor. I didn’t do every other modifications to the physics, simply switching the editor made it work. Thanks for the assistance

@linrm All I meant is that I used to be anticipating the character to be falling down due to gravity.

As your screenshot, you might be utilizing physic second builtin. It used for examine collide fundamental. It is best to use box2d physic on challenge settings as pandamicro suggest

Hello @pandamicro ,

any replace on the bugfix for the box2d physics in Editor Preview? Could be actually nice to have the ability to use the Editor Preview, because it offers extra debugging performance because of the reality, that one can examine the scene view.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments