#your video has like a 2 second segment
1 messages · Page 1 of 1 (latest)
Sort of what I did.
Here's the message, if it's against the rules or something I'll remove it:
I use this script:
using UnityEngine;
[RequireComponent(typeof(Rigidbody))]
public class TestScript : MonoBehaviour
{
[SerializeField] private Vector3 _force;
private Rigidbody _rb;
private void Start()
{
_rb = GetComponent<Rigidbody>();
_rb.AddForce(_force, ForceMode.Impulse);
}
}
Place 2 cubes in the scene, as seen in the first picture.
Set all the values in the inspector, as seen in pictures 2 and 3.
And just press play.
Right cube will end up getting pushed by the left cube, even tho right is unstoppable and left is feather.
I hope this helps debugging at least a bit.
From my testing, this appears to be related to the Continuous Dynamic setting.
When set to anything else, the cube just doesn't get launched away, maybe that's a good first thing to look into?
I created a thread in order to avoid spamming the main chat.
good idea for a thread. Apparently there is a BetterPhysics collision matrix, how did you configure that?
I think that should be fine, here:
your force vs mass and damping values seem very high
Yeah, I was going for a very snappy movement if that makes sense, high acceleration with fast slowdown.
Btw, this might not be as critical of an issue as I initially thought, I am playing around with time slowdown values, and I might be able to workaround the player getting launched to the side by slowing time down faster and properly displaying the impact.
seems like continuous dynamic collision detection breaks it. Continuous works
Nvm, I just tested this and it makes the getting launched to the side part even more apparent :/
The issue is, continuous dynamic was the only type that resulted in properly registered collisions at such high speeds :/
I remember watching a video, and if I am remembering correctly, dynamic is the most accurate one when both objects are dynamic, and speculative is better for rotations but way less accurate for other stuff.
And that was actually really felt in the game, you would just fly through fruit and stuff.
well your bodies are traveling at half a kilometer a second on their first frame so it's not that shocking
that's why the numbers stood out a lot to me
I think it's less.
The entire arena is 200x200x200, or close to that at least.
And I move maybe 1/5th of the arena per dash.
I'm not saying they travel half a kilometer in a second, but that the physics system will treat them as having absurd velocity for several timesteps
I didn't know that was an issue, thought that should work fine as there are other fast paced games.
Would you suggest I change this system entirely?
If yes, what would you suggestions be?
hmm the way BetterPhysics does its unstoppable thing doesn't seem to work at all with continuous dynamic. Maybe you can come up with your own physic contact modification that does work
I thought maybe they just missed the CCD contact callback but my own implementation doesn't work even with that change
That's really unfortunate :/
I really appreciate you testing this.