Tag Info

Hot answers tagged

3

Simple Solution If you want the body to instantly rotate just call Body::setTransform and pass the current position and the desired angle, don't bother applying torques or anything. The function call could be something like this: body.setTransform(body.getPosition(),myDesiredAngle); Physics Solution If you want the player body to interact with bodies ...


2

The simplest way to find out how a physics-based sequence would turn out is to simulate it. Sample the positions as you go and draw indicators on suitably spaced places. This works regardless of the model you're using, may it be an actual simulation or some simplified model like "follow this parabolic path".


2

If you are looking to mimic old school platformers step one is to ditch physics altogether. You will end up fighting the physics system to get the decidedly non-realistic motion of an old school platformer. Have a look at this CharacterController replacement that ditches physics altogether to get a good idea of one way to implement it.


1

You can create a manager script that keeps count of how many rigidbodies are currently not sleeping as so (VERY simple example): using System; using UnityEngine; using System.Collections; public class SleepTracker : MonoBehaviour { public static SleepTracker Instance { get; private set; } public event Action onAllObjectsSleeping; private int ...


1

A negative solution means that the time at which that separation distance occurred is in the past. An imaginary (or complex!) solution means that the time at which that separation distance occurred neither has, nor ever will, occur. This is the meaning of the square-root term being negative.



Only top voted, non community-wiki answers of a minimum length are eligible