|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
cardoso |
|
Old Version |
Published before Godot 3 was released. |
I see 3 potential options:
a) Make use of simple custom physics, while manually using shape collision functions, and checking if entities are on the same Y plane (more like an interval of Y values). But all those pre-built physics of Godot cannot be used, and they are very handy.
b) Hack around with Godot’s physics. Is there a way it would work? For example, how to still have the auto collision detection and resolution taking place by using kinematic/rigid/static bodies, but only if the elements are on the same Y plane?
c) Use 3D space + Orthogonal Projection + 2D elements. I made a basic scene, though I could not have the camera looking “right” and… well it’s 3D, more complicated I guess, and there isn’t as much documentation.
Are any of those options doable? Are there other ways?
edit: I am mentioning physics quite a bit, but I actually wanted to mean auto collision detection and resolution of using PhysicsBody2D (like a Kinematic or Static body) nodes.
|
|
|
|
Reply From: |
Warlaan |
Why would you want simulated physics for a game like Streets of Rage? Maybe I don’t know your game design well enough and it’s actually a lot less like Streets of Rage than I think, but for a game like the original I would never use simulated physics. All you are interested in are collisions so you know who has been hit. For the rest I would suggest animations or Tweens.
Yes, it’s not the physics itself, but the collision detection and resolution.
It is nice to use kinematic bodies (for example) for the player and enemies, and static bodies for other things in the level, and just like that the player will never pass through enemies, etc.
I started imagining more complex levels and that pre-built collision detection/resolution seems very helpful.
cardoso | 2016-06-04 19:17
|
|
|
|
Reply From: |
Hinsbart |
Take a look at the collision layer and mask system.
I think all you have to do is have different collision layers and set them on your Bodies depending on their position on screen.
Thanks! I did not know about the collision layer and mask system.
I was trying and it already and seems like a great option to consider for this case as well as for other situations.
It does have one small quirk: moving from top/bottom to another shape + both shapes are overlapping + it is time to make collision layers and masks “match” to trigger collision → causes moving body to instantly move to the left or right to solve the collision - at least for similar shape bodies. Though weird the first time I saw it, kind of makes sense.
cardoso | 2016-06-05 21:47