Skip to main content
GameDev.net gamedev.net
🔒 Locked

object wrapping around octtree

Started by hlivingstone Jul 19, 2003 at 3:17 AM 0 replies 450+ views
Original Post
hlivingstone
hlivingstone
im currently writing an octtree; when objects exceed the boundries of it, i want them to wrap around to the opposite end of the octtree. my friend said this can be accomplished by moding each exceeding axis of the coord by the absolute value of the length of the quadtree on that axis. for example if the x axis exceeds the bounding box for the octtree, new_x = old_x % fabs ( octtree.xwidth ). thats terrible syntax but hopefully you get the idea. however since last time i checked you cant mod floats. before i start racking my brain on this i just thought i would see what you guys have to say. thanks, hans
oliii
oliii
fmod(x, y) mods floats
Everything is better with Metal.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.