I have bullets with Physics Behavior in my game. (Needed for how the bullets interact with the Physics ships they hit.)
Right now, if the player shoots a bullet and it leaves the screen it will WRAP around to the other side using the included CC "Wrap" behavior.
This all works perfectly, until I turn on Vsync at 60 FPS.
Then suddenly, the bullet will no longer wrap at the edges of the screen, it'll just hit the edge and keep bouncing.
I ran into a similar problem before with the player's ship (also a Physics object.) In that instance, I was told to turn off the Wrap Behavior in Construct Classic and just "roll my own."
+ System: Ship2.Y Lower than -10
-> Ship2: Set 'Ship2VelX' to Ship2[Physics].VelocityX
-> Ship2: Set 'Ship2VelY' to Ship2[Physics].VelocityY
-> Ship2: Set immovable: Yes
-> Ship2: Set Y to 1205
-> Ship2: Set immovable: No
-> Ship2: Set velocity to (Ship2.Value('Ship2VelX'), Ship2.Value('Ship2VelY'))
Works great, but there is only ONE ship per player. With the bullets, a player can shoot up to FIVE at any given time, all created from the same sprite...
I tried a version of the above with a "For each Object" event. The first bullet wrapped perfectly, the others following behind it suddenly slowed to a crawl (something, I think, to do with the fact that they all share the same private variables?)
So, I'm looking for a way to:
A)figure out how to ID each individual instance of the bullet and
B)store it's current Velocity in a unique private variable.
Or, barring that, IS there another way to wrap a physics object in CC?
Should I just forget about vsync and leave the frame rate set to "Unlimited"? (This is not a commercial game, so it might not matter in the long run.)
Am I going about this all wrong?
Any advice greatly appreciated...