Timeline for character movment and physics on 2d game
Current License: CC BY-SA 4.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 8, 2021 at 7:01 | comment | added | Mamad R | hey again, as I'm using a port of box2d. there isn't shape cast there yet. by the way i can use many ray cast in circle like directions. but do you guys know better way? i mean builtin functionality in physic engine that can help me? | |
Dec 7, 2021 at 15:23 | comment | added | Mamad R | @DMGregory thanks, its sounds good and seems will solve my problem. i must put static body on a collision group and player on another that player not collide with each other then try your solution. i am going to check the solution. | |
Dec 7, 2021 at 14:41 | comment | added | DMGregory♦ |
Box2D has had a b2ShapeCast function since 2.4.0, and its output includes the collision point and normal. But of course, for circles it's easy enough to compute this analytically. A collision between a swept circle and a stationary one (or equivalently, two swept circles, as viewed in the inertial frame of one of them) is equivalent to a ray intersection with a circle having the sum of their radii. So you might find it easier to just write your own swept check
|
|
Dec 7, 2021 at 14:38 | comment | added | Mamad R | @DMGregory box engine has limited functions and its hard to find normal etc. | |
Dec 7, 2021 at 14:30 | comment | added | Mamad R | @DMGregory thanks. nice post but they have unity engine with sphere cast functionality but i have box2d like engine. can you show me few line of code to help? | |
Dec 7, 2021 at 14:03 | comment | added | Mamad R | @Vaillancourt yes exactly. but we have 3d game but as we don't care about height (Y) in server we decide to choose a top down approach. we have a polygon shape as our outline (border). players can't exit this polygon outline and in map some where we have wall. | |
Dec 7, 2021 at 13:44 | comment | added | DMGregory♦ | You may be interested in the approach used here: Nestling into contact with a group of physics objects without exerting forces on them. The trick is to not have player objects "collide" per say. Rather, each player, when moving, casts out a query for other player objects between itself and its intended destination, and then reduces/redirects its movement to not-quite-touch those players, rather than overlapping them or passing through to the other side. | |
Dec 7, 2021 at 12:47 | comment | added | Vaillancourt♦ | Just to make sure: you're creating a top-down game with no gravity, right? | |
Dec 7, 2021 at 11:42 | history | edited | Mamad R | CC BY-SA 4.0 |
added 202 characters in body
|
Dec 7, 2021 at 11:36 | history | edited | Mamad R | CC BY-SA 4.0 |
added 202 characters in body
|
Dec 7, 2021 at 10:04 | history | edited | Mamad R | CC BY-SA 4.0 |
deleted 2 characters in body
|
Dec 7, 2021 at 9:47 | history | edited | Mamad R | CC BY-SA 4.0 |
deleted 2 characters in body
|
Dec 7, 2021 at 9:41 | history | edited | Mamad R | CC BY-SA 4.0 |
added 348 characters in body
|
Dec 7, 2021 at 9:36 | history | asked | Mamad R | CC BY-SA 4.0 |