Search Issue Tracker

Fixed in 2019.1.X

Votes

0

Found in

2018.3.0a1

Issue ID

1096382

Regression

No

All arguments are mandatory for (int)PhysicsScene.SphereCast, even though they shouldn't be

Physics

-

How to reproduce:

1. Open any (new) project
2. Import the attached script
- Observe the compilation error
- The error happens because 3 of the arguments have no default value and are therefore not optional.
- Only happens for SphereCast, other multiscene queries work as intended
- Non-multiscene/default scene queries are not affected

Code in the script:

using UnityEngine;

public class ThisShouldCompile : MonoBehaviour
{
void Start()
{
RaycastHit[] hits = new RaycastHit[1];
int number = new PhysicsScene().SphereCast(Vector3.zero, 1.0f, Vector3.forward, hits);
}
}

Comments (203)

  1. beriberis

    Mar 16, 2020 07:53

    I really appreciate the kind of topics you post here. Thanks for sharing us a great information that is actually helpful. Good day!
    http://michigan-bankruptcy.org

  2. beriberis

    Mar 15, 2020 09:01

    Thanks a lot for sharing us about this update. Hope you will not get tired on making posts as informative as this.
    Bar & Tender https://www.barandtender.co.uk

  3. beriberis

    Mar 12, 2020 16:38

    Its a great pleasure reading your post.Its full of information I am looking for and I love to post a comment that "The content of your post is awesome" Great work.
    digital marketing https://responspartner.no

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.