[Solved] Changing density doesn't seem to do anything?
Hi, I have this shmup I'm making where a big moon comes in and takes up half of the screen while you're trying to fly. The idea is that the moon is so big, you can't really do anything to it, so it's just a big obstacle that slowly flies through the screen (speed at like 15 or so) with a move function.
What I was hoping to do was give it a collision attribute and set the density extremely high so that the player's ship would have no affect on it when it collides with it, therefore it would be forced to go around. It's basically a big moving wall that the player can't influence in any way. I thought it would be kind of cool as the moon has a round shape and the ship would slide around it as it moved.
However this doesn't seem to be working. The player's ship has a density of 1 while I've upped and upped the moon's density to 5,000,000 at this point. The ship still ends up moving the moon around like it's some kind of balloon. Any ideas on what I'm messing up here? I can't make the moon non-moveable, because it still needs to move, unless there's some sort of workaround for that I'm not aware of.
Comments
I'm not sure why it's not working for you (do both actors have Movable checked?) but here's a demo that shows a light blue actor with density 2 and a dark blue actor with density 2000.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Make sure and set the density in the actor attributes and NOT with a change attribute behavior. The change attribute behavior will have no effect on the initial setting.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
I figured out what the issue was. My character had some hitboxes. Those hitboxes were what I was trying to have the moon collide with, however, since they were constrained to my character, they weren't reacting to the moon properly. I changed what the moon was reacting to and that fixed it. Thanks for your help guys! It showed I was doing the right thing, just looking for the solution in the wrong place. :-/
Vote for Nearest Neighbor Scaling option in gamesalad! Let's make our games look truly stunning!