Tuesday, June 6, 2023
HomeGame DevelopmentThe right way to handle Kinematic object and easy methods to handle...

The right way to handle Kinematic object and easy methods to handle collisions – Cocos Creator

Hello to you all, sorry for this actually primary subject:

I want to grasp easy methods to take care of a Kinematic RigidBody colliding with an object with a Static RigidBody.

I’m at present studying the documentation:

The issue although is that I haven’t found out what values I’ve to make use of to maintain observe of how far I’ve to maneuver the article “again” in order to not depart it overlapping it.

In reality I merely must be sure that my participant (whose motion goes solely to the precise and left) to cross with a Wall should cease and never proceed together with his motion.

How ought to I do with out having to make it Dynamic?

What model of Creator editor are you utilizing?
Taking a look at your query it needs to be, simply collision detection to make the article cease, no must generate physics results.

Are you able to seek advice from this demo and take a look at utilizing the collision detection perform?

hello, thanks for the response, however i used to be looking a few 2nd context, not 3d. The model of Cocos Creator is 3.6.3.

For now what i discovered is the worldManifold technique that i’ve to name with the contact Object. However i don’t know easy methods to handle it, there may be some instance or article ? :frowning:

Hello there, this query may be very attention-grabbing, it’s primary however not straightforward. Let me head straight ahead to a solution: don’t use the builtin physics engine or the collision system in Cocos, strive GitHub – Sinova/Collisions: Collision detection for circles, polygons, and factors if you wish to have an in depth understanding of the subject.

How good is that resolution? For multiplayer motion sport use I ported the algorithm into Golang after which transpiled it together with different sport dynamics again to js for the frontend, and the result’s like [Video attached] Rollback Netcode on websocket with a Multiplayer Platformer sport demo open sourced – you may handle all “laborious pushbacks” and “comfortable pushbacks” flexibly – which is almost unattainable with a builtin physics engine. Good luck coding!

1 Like

Sorry, I misinterpret it, it’s a 2D physics drawback.
So for an instance of what you want, you may refer right here

1 Like

thanks for the hyperlinks, however sadly i didn’t discovered an instance on this github repo about kinematic physique, solely dynamic :frowning:

Plus, a few of the predominant examples that we will discover inside the primary repo of cocos creator not work and that i don’t know why as a result of chinese language messages on the display screen (i suppose there is no such thing as a cannon.js or bullet.js module ?)

Hello! I’ve not put in already a module inside a cocos creator mission. Do you imply to put in it with npm and use it inside a script element? If sure, are you able to present me an instance easy methods to do it? It is a first try to make use of a module inside cocos creator, i’m not already 100% assured with it however i want to strive it! :smiley:

I don’t know ccc’s idiomatic means both, my means is slightly curvy however generic to construct the lib by webpack and port it instantly into ccc mission, like this DelayNoMore/frontend/belongings/scripts/modules at v0.8.5 · genxium/DelayNoMore · GitHub

Official members please assist right here if any disagreement with my strategy



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments