Search Issue Tracker

By Design

Votes

0

Found in

2017.4.0f1

2018.4.0f1

2019.1.0a1

2019.2.0a1

2019.3.0a1

2019.3.0a6

Issue ID

1169842

Regression

No

RigidBody.AddForce() does not add force to RigidBody when child ParticleSystem is selected in Hierarchy window

Physics

-

How to reproduce:
1. Open attached 'project-1169842.zip' project
2. Enter Play mode
3. Press and hold 'Space' button
4. In the Hierarchy window select 'Particle System' (child of Cube)
5. Press and hold 'Space' button

Expected result: Cube is moving upwards (as it did without selecting 'Particle System')
Actual result: Cube does not move

Reproducible with: 2017.4.30f1, 2018.4.5f1, 2019.1.12f1, 2019.2.0b10, 2019.3.0a10

Additional notes:
1) In 2019.3.0a3 version and earlier - the Cube does not move at all, even when 'Particle System' is not selected
2) The same results while using Rigidbody.AddRelativeForce()

  1. Resolution Note:

    Essentially, this is not a bug. The attached script listens to Update() and in case a key was pressed, adds some amount of force. This script is framerate-dependent, and is also input-dependent, that is the behaviour depends on how long was the key pressed for. At high fps it's really hard to to keep pressing for consistent time periods, thus making every run different. This script has to guarantee that the force is applied over time (via FixedUpdate, and you have to multiply magnitude by Time.fixedDeltaTime).

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.