# Tag Info

1

Based on Charly's solution private void OnCollisionEnter(Collision collision) { if (collision.gameObject.CompareTag("CannonBall")) { var fragments = Instantiate(_fragmentsPrefab); fragments.transform.position = transform.position; gameObject.setActive(false); Physics.SyncTransforms(); var rigidbodies = ...

-1

It seems like you want your player input to enact a constant position change (MovePosition) on the character while having the velocity still be affected by the forces (AddForce) of wind, gravity, and other things in the physics engine. The player velocity, being a separate type of movement, can simply be hardcoded using MovePosition(position + direction * ...

0

Multiplying by a time delta is a form of integration. You do it when you want to convert a linear rate of change over time into an increment, like to go from a speed (rate of change in position over time) to a displacement (amount of change to apply this frame). So, this is correct: speed.x += ACCELERATION * delta; because we're taking a rate of change in ...

-1

Add like bowls so like for example the first marble gets second place and second gets first and add some spinners, teleporters, etc. It would be fun and challenging!

4

Just because you name a variable "height" does not make it a measure of height. The way you're using this variable, it is not a height but a force: rb.AddForce(Vector3.up * jumpHeight); So instead of representing a 7 meter rise, it represents a 7 Newton nudge. 1 Newton is enough force to accelerate a 1 kg object by $1 \frac m {s^2}$. And you ...

1

I am by no means a Blender or collision expert but I assume you have access to internal code of Blender https://github.com/blender/blender , I believe what you are trying to achieve needs calculations that happen during collision tests unless Blender exposes some api that allows you to get vertices of intersection. Getting these vertices should be possible ...

0

Ok, here is a heuristic solution that results in sprite motion qualitatively similar to what one would expect from a human player using arrow keys. This solution works for motion from an initial position (A) in 2D to a goal position (B) in 2D: First, define vectors corresponding to the arrow key directions. Then, compute the heading vector between A and B. ...

Top 50 recent answers are included