(06-08-2019, 09:20 AM)bobby Wrote: Thank you for the quick response, I will try that.
Hi there, it didn't work.
The particles are still jumping around. I changed the update mode to "After Fixed Update" and wrote a script to update the transform inside FixedUpdate:
private void FixedUpdate()
{
if (Input.GetMouseButtonDown(0))
{
startMousePos = Input.mousePosition;
}
else if (Input.GetMouseButton(0))
{
var dir = (Input.mousePosition - startMousePos) / Screen.dpi / 10;
transform.position += new Vector3(dir.x, 0, dir.y);
}
}
(06-08-2019, 10:57 AM)bobby Wrote: Hi there, it didn't work.
The particles are still jumping around. I changed the update mode to "After Fixed Update" and wrote a script to update the transform inside FixedUpdate:
private void FixedUpdate()
{
if (Input.GetMouseButtonDown(0))
{
startMousePos = Input.mousePosition;
}
else if (Input.GetMouseButton(0))
{
var dir = (Input.mousePosition - startMousePos) / Screen.dpi / 10;
transform.position += new Vector3(dir.x, 0, dir.y);
}
}
Interesting. I set the update mode to Late Update and it works now.