Sunday, April 14, 2024
HomeGame Developmenthandle Kinematic object and the way to handle collisions - Cocos Creator

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


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

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

I’m at present studying the documentation:
https://docs.cocos.com/creator/guide/en/physics-2nd/physics-2nd-contact-callback.html

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 thing “again” in order to not depart it overlapping it.

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

Are you able to check with this demo and check out utilizing the collision detection operate?

hello, thanks for the response, however i used to be looking 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 way to handle it, there’s 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, 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 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’ll be able to handle all “onerous pushbacks” and “smooth 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’ll be able to 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, among the principal 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 isn’t a cannon.js or bullet.js module ?)

Hello! I’ve not put in already a module inside a cocos creator challenge. Do you imply to put in it with npm and use it inside a script part? If sure, are you able to present me an instance the 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 manner both, my manner is somewhat curvy however generic to construct the lib by webpack and port it immediately into ccc challenge, like this DelayNoMore/frontend/property/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 simply shared to me is with a CC model too previous (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 way to handle kinematic physique and to resolve the collisions? :frowning:

RELATED ARTICLES

LEAVE A REPLY

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