Random point on the layout -
X: random(layoutWidth)
Y: random(layoutHeight)
Random point on the screen -
X: random(ViewportLeft(layer), ViewportRight(layer))
Y: random(ViewportTop(layer), ViewportBottom(layer))
So the tip of the projectile in the sprite is at -90 degrees (pointing up), correct?
The easiest solution is to simply rotate the image in the animation editor.
If you can't do that for some reason, you can also disable "set angle" in Bullet properties and set the angle on every tick to Self.Bullet.MovingAngle+90
Use a spritefont or hide the texts while the window is resizing. You can fade them in once the tween is finished.
Develop games in your browser. Powerful, performant & highly capable.
I don't understand.. The origin point doesn't rotate, it's the center of rotation of a sprite.
Do you want to rotate the sprite around a different point?
Try unchecking "width" and "height" in hierarchy options for text object.
If this doesn't help, you can replace it with a spritefont, this should definitely fix the issue.
However i have a much smaller project with less than 2000 events/actions and 120 objects. Nothing fancy, and i still had 5 seconds lags when selecting (double click) js- or moving event blocks.
Have you tried clicking "collect garbage"?
You can see through the debug mode or remote preview how the frame rate drops
This doesn't happen on my Windows laptop. CPU utilization goes up to 30% for a short period, but the tween runs smoothly and there is no fps drop. I'm guessing the problem is either with Tween or hierarchies on MacOS/IOS.
I would try these things:
Does this demo project also have performance issues on iPhone? Because I see absolutely no problems in the code, it's simple and effective.
Here is an old demo:
howtoconstructdemos.com/controlling-a-slider-bar-with-gamepad-capx
Strangely, I didn't have any freezes in the past two weeks. I've been using C3 on a different machine where I didn't touch the performance settings in Chrome. Yet the same project that used to lag and freeze terribly now works fine!
I'm guessing some memory leak issue was fixed in the latest Chrome release.
I heard that windows games work on the Deck. Have you tried win32 and win64 exports?
I would use Spline, it's a popular C2 addon by Rex ported for C3. It works like MoveTo only for curves, allows to adjust speed and curve tension.
Member since 26 May, 2016