0 votes

I want to set new collisionnormal, based on original, right before two rigidbodies2D collides so phisics engine would resolve collision from this new collisionnormal.

Godot version 3.2.3
in Engine by (34 points)

1 Answer

0 votes

The collision_normal is based on the shapes and rotations of your objects, so you would need to change one of those to change the normal.

You could do that just before they touch, by using an Area around them, that would be slightly bigger than their CollisionShape.

However, this seems a bit annoying, maybe we could lead you to an easier solution if you told us why you need to change the normal ?

by (2,482 points)

Thank You for the answer Lopy
Of course it's annoying but i'm not a programmer and couldn't find better sollution.

The problem is, I'm trying to make isometric collisions but rigidbodies works (as far as I know) in cartesian. I tried to find a way to change global transform matrix for PhisicsBodies but I failed. I can change transform matrix for VisualServer to be isometric . All my KinematicBodies2D works well in this scenario. If my model is isometric already i make simple Transform to make it virtually cartesian and I have perfect isometric collisions. Unfortunately rigidbodies cannot be transformed this way. But biggest problem is the collisions of Rigidbodies are still cartesian.
I tried hack the system and swap rigidbody's velocity vector direction with that i calculated but I am not sure it works properly. So I imagined if I could tell Phisics engine the normal and get proper isometric collision this way but now im pretty sure result of collision still will be cartesian therefore incorect.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.