Jump to content
  • Advertisement
Sign in to follow this  
zfvesoljc

[c++] AABox, falloff to an arbitrary point

This topic is 3162 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have an axis aligned box, with a 3D point ("center") inside (or even outside perhaps) the box. What would I like to do is calculate falloff from this point to an arbitrary position inside the box. If the box was a sphere and the point would always the sphere center, this would be pretty straight forward, but since the "center" point can be moved... I'm not looking for all out precise calculations, an approximation would suffice (speed wise). Currently only linear and cubic falloff are needed. Any ideas of how to handle this?

Share this post


Link to post
Share on other sites
Advertisement
Why is the box relevant? Why isn't this just calculating the falloff between the 'center' point and your arbitrary point?

Share this post


Link to post
Share on other sites
You are right... I'm just gonna use a sphere, simpler and faster. I'm working on a deflector/attractor system for particles. Don't really know why I wanted to complicate with boxes and arbitrary center point...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!