Just created a Sample 3 which show how you can create planets around other planets and use them to move between them. Also each planet has their own Clouds, Gravity.
Add some rotation to make it harder for the player to walk between them.
I decided to add Projectile in this project which mean, the player will be able to shoot with a gun and the projectile will use this gravity and hit the other character on the other side of the planets.
Sounds a good idea? I’ll post a update when it’s done
Now planets can be Increased/Decreased when jumping on a switch. Also, everything on the planets keep their own scale and they get back to position. When increasing/decreasing, the appropriate sound is played.
Also, coded Projectile when pressing SPACE. The Projectile will be created on the same direction of the character and will follow until it dissapear. In another patch, it will collide with enemy character which will be destroyed. Also, there will have Spawner who will create enemy character until you destroy it. (VERY SOON)
Leave a post if you want any new features.
What’s coming next?
Changing gravity between planets
Creating zone which will use 2D Gravity & Normal Gravity (Up/Down). Ex : Your outside a space shuttle and you enter it, you will now be walking normally. Not on wall or roof. Then you go back outside, then you can walk anywhere on the ships.
Objects 2D Gravity (Crates, Jar… ) When changing gravity, the object can rotate itself and be on the top or right side. Characters are always on their 2x legs.
Many enemys which will make the game better (Enemy Ships, Enemy Probes)
Advanced Projectiles (Missile, Arrow using the Bezier curve)
There are now 2x type of projectile.
Bullets and Missiles. Bullet will follow planet gravity and go around it.
Missile are different. They will go where you aim it and explode killing hostile NPC.
Also, the crates can now be pushed in the teleport.
Hi, I was working with your asset and noticed that the player’s sprite is missing. When I add the sprite, the player just dropped infinitely in the space. For now, I can only change a character comes with the planet to a normal player, but the sprite is still in “enemy” form no matter how many times I change it. Can you provide a detailed description on what components a character needs? Thanks!
Hi, I recently purchased 2d gravity kit, it’s great! I’m testing performance and it can cause quite large framerate drops when using many instances. This is where I’m at so far with optimisation and wondering if you have any advice.
Removed rigidbody
Removed collider
Enabled gpu instancing on Material
Commented out all of the Debug.drawray lines, and the checks for mouse position (they don’t use weapons)
Moved everything in FixedUpdate into a function called CheckPosition()
In FixedUpdate I’m just doing: ```
if (vCurPlanet == null || !Grounded)
CheckPosition();
Grounded = true is currently being set next to vFoundGround = true (~line 408?) I don't think this is the right place for it to go as they no longer complete their full rotation before stopping.
I only really need to update their rotation if they decide to move (wander). They also don't need to jump planets. My thinking is that once they know their position and rotation relative to the planet, they don't need to constantly update. Are you able to point me to where they should be set to fully grounded and do you have any ideas on further optimisation?
Any advice would be fantastic. Looking forward to hearing from you!