natecraddock / projectile

An artist-friendly tool for throwing stuff around inside Blender

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: frame rate handler

0todd0000 opened this issue · comments

Hi, thank you for the fantastic tool!

I noticed that projectile.py contains a gravity_change_handler. I wonder if it would be possible to add a frame rate change handler? Currently the calculated trajectories do not appear to adapt to frame rate changes.

This is something that I meant to add, thanks for pointing out that projectile is missing the handler, it should be pretty simple to add it in.

Okay, I added the functionality. Frame rate changes should automatically update each object (if auto update is enabled in the projectile settings.)

Thank you!! It appears to be working, but only when the initial velocity is changed.

Here's what I'm doing:

  • Launch Blender with the default cube scene.
  • Add Projectile object using the Physics tab in the tool shelf.
  • Ensure that Projectile's Auto Update is checked
  • Set the initial velocity (Z) to 10 m/s
  • Play the animation (result: everything looks fine)
  • Change the Frame Rate to 60 fps in the Output tab.
  • Re-play the animation (result: the projectile moves too quickly)
  • Change the initial velocity (e.g. to 5 m/s) (result: everything looks fine again)

It's not a big problem, but I wonder if there's a way to update the animation when the frame rate is changed, and thus avoiding the velocity reset?

@0todd0000 You are right, I had forgotten to ensure the update worked for each projectile. You should be able to just change the frame rate now and everything will update (even with multiple projectiles). I have pushed a fix, let me know if it works!

Apologies for the delay. I just checked the updates, everything's working great now. Thank you!!

Not a problem, glad to help :)