So basically I have a box with a non-trigger collider that has a non-kinematic rigidbody with continous dynamic setting enabled for the collision detection, and if I apply force to the rigidbody it works as intended: if it has a high velocity it still detects intermediate collisions and does not go through thin colliders. BUT if I don’t use addforce (because I’m making an AI script thingy that should move more realisticly instead of just sliding on the ground like it has skates or something), instead I use Rigidbody.MovePosition with the exact same setup with the cube and the wall the cube just goes through it if I set the movespeed to about like a running speed (works mostly fine if it has a small speed but still kinda goes into the wall). SO MY QUESTION IS: Is there a way to enable continous collision detection for the Rigidbody.MoveRotation (I mean like MoveRotation(DestPos,true); would be very useful), or is there a workaround with the results I’m looking for with like playing with addforce and stuff?
Here is the script btw:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MovePosTester : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void FixedUpdate () {
if(Input.GetKey(KeyCode.K)){
GetComponent<Rigidbody> ().MovePosition (transform.position + transform.forward * Time.fixedDeltaTime * 40.0f);
}
}
}
And here are a the evidences :