# Collisions use to work what did I do

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
• I saw that too...I'm going to take a guess and say it makes the integer convert to a float....drumroll...Snail says? lol

• It isn't crazy at all. If you don't include a decimal point ever in the variable (in this case, xPos), the variable will remain an integer unless it encounters an expression that converts it to a decimal point. That is, if xPos is equal to 25 and you use this expression in Fusion:

xPos / 2

xPos will become 12, not 12.5. If you need to do any division or multiplication with a variable, it's always a good idea to convert it with a decimal point. Since addition and subtraction are the fastest operations you can perform, it's better to add 0.0 to the value than it is to multiply or divide it by 1.0.

You're exactly right with your analysis of what it's doing and you're right to see where the slowdown's going to be when you use the distance variable here. Hopefully someone has a more efficient way of performing that test but it was the easiest one I could think of that doesn't use a loop. When you have 100 missiles, each frame Fusion has to recalculate the distances for all of them. Thinking more about this, using small hitboxes would be much better than calculating the distance as long as the hitbox is no smaller than the speed of the missile. You'd do Missile collides with Target: Start loop for each Target/Missile the same way it's set up now, but Fusion would only ever run that event when a missile hits its target.

• Wiggy, right again! I was writing that reply. Nice.

• YESSS!!! I actually have proof I'm learning something, whooohooooo! XD

Yeah, I see what you mean, that would work too. I think I might not stick with this now, lol

Last question for me. Would it benefit any to multiply by 1.00000 to convert it to 12.00000 for an (insane) amount of detail in the angle?

Edited once, last by wiggy: thought one thing, typed another, lol (August 25, 2015 at 7:35 AM).

• I've changed my mind again! 10,000 objects runs much slower on my computer than 5,000 objects using the distance expression. So you're good with the example I made for you.

• VERY cool to know, I'll stay with this method then for sure!!

Thanks again Snail, you the man! er..snail, lol

• No. Fusion only uses floats, so once you cast the variable as a float, it'll use as many digits as it can. Adding additional 0s, for example, won't change the values that Fusion will return.

## Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!