#rigidbody
1 messages · Page 1 of 1 (latest)
@nova wharf mind if I help you?
if (Physics.Raycast(camPos.transform.position, mainCamera.transform.forward, out RaycastHit hit1, maxHighlightDistance))
{
if (!isGrabbed)
{
if(hit1.transform.gameObject.TryGetComponent(out Rigidbody newRb)) {
highlightedRB = newRb;
if (Input.GetKey(KeyCode.Q))
{
if (hit1.collider.CompareTag("Interactable"))
{
isHighlighted1 = true;
}
}
}
}
}```