Sunday, April 14, 2024
HomeGame DevelopmentThe way to handle Kinematic object and the right way to handle...

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

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

I would like to know the right way to cope with a Kinematic RigidBody colliding with an object with a Static RigidBody.

I’m at the moment studying the documentation:

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

In reality I merely should ensure that my participant (whose motion goes solely to the appropriate 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 must be, simply collision detection to make the thing cease, no have to generate physics results.

Are you able to consult with this demo and take a look at utilizing the collision detection operate?

hello, thanks for the response, however i used to be looking out a couple of 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 the right way to handle it, there may be some instance or article ? :frowning:

Hello there, this query may be very fascinating, it’s primary however not simple. Let me head straight ahead to a solution: don’t use the builtin physics engine or the collision system in Cocos, attempt 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 recreation use I ported the algorithm into Golang after which transpiled it together with different recreation dynamics again to js for the frontend, and the result’s like [Video attached] Rollback Netcode on websocket with a Multiplayer Platformer recreation demo open sourced – you possibly can handle all “exhausting pushbacks” and “mushy pushbacks” flexibly – which is almost unimaginable with a builtin physics engine. Good luck coding!

1 Like

Sorry, I misinterpret it, it’s a 2D physics downside.
So for an instance of what you want, you possibly can 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 number of the fundamental examples that we are able to 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 isn’t any 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 the right way 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 wish to attempt it! :smiley:

I don’t know ccc’s idiomatic means both, my means is somewhat curvy however generic to construct the lib by webpack and port it straight 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 method

I suppose this instance that you just shared to me is with a CC model too outdated (i see hearth extension for the scenes). Are you able to clarify to me a controller that you’d handle?

Higher ask @muxiandong or @pandamicro for assist

Have you ever checked matrix of collision?

No, are you able to give me some instruction on the right way to handle kinematic physique and to unravel the collisions? :frowning:

attempt to test perhaps there may be nothing to marked

oh that one, sure. I’ve my components. However what i don’t know the right way to work is on the callbacks. How am i able to intercept and calculate the collision from a static and a kinematic physique?



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments

Arnavsijapati on Planet of Lana – Beta Demo
Jai Kishor Upadhyay on Planet of Lana – Beta Demo