Skip to main content
4 votes
Accepted

How can I create the water-like blur effect in Chameleon Run using SpriteKit and Unity?

It looks to me like this could be done with a TrailRenderer. This leaves a ribbon of 3D geometry behind a moving object, onto which we can assign a material to control the way it renders. We can use ...
DMGregory's user avatar
  • 136k
3 votes

How can I create a "wireframe" texture for a sphere in SceneKit?

Try setting the material fillMode to .lines: ...
Morty's user avatar
  • 131
3 votes
Accepted

Get the up vector of the camera in ARKit

In a 4x4 transformation matrix, all directions are contained: First row of matrix contains the x-axis. Second row of the matrix contains the y-axis. Third row of the matrix contains the z-axis. ...
Bram's user avatar
  • 3,734
3 votes
Accepted

Calculating the difference between two numbers using exponential growth

To put these into a formula, it seems that you want something that varies with the distance from the boundary, so first calculate that parameter (I'll call it dx ...
tom10's user avatar
  • 196
2 votes

Why does my 3d model become invisible as I move the camera away?

I do not use swift, but engine Cameras usually work with a frustum, which is a special type of collider, almost like a cone away from the camera, that decides what ...
Natalo77's user avatar
  • 699
1 vote
Accepted

How to check multiple rings of tiles around a center tile on a 2D grid

When the order does not matter, then you can simply check a whole square from top-left to bottom-down, and skip the position of the origin. I never programmed in Swift before, so here is how I believe ...
Philipp's user avatar
  • 122k
1 vote
Accepted

Quaternions distorting object in Metal

Alright so the main problem was actually that I had to projection matrix that changed depending on the aspect ratio of the window that was being rendered to. So with that out of the way I actually ...
CaptainLupa's user avatar
1 vote

How can I prevent the camera going out of bounds?

How about simply adding a condition in updateCameraPosition? You'll obviously need to define leftBoundary and ...
West1's user avatar
  • 131
1 vote
Accepted

A ball hits the corner slightly, where will it deflect?

You can't just "flip velocity over y". To further that point, its obvious to see on the left and right sides of the box you would not flip over y, but instead flip over x. On the corners you ...
Andrew Wilson's user avatar
1 vote
Accepted

Swift get the true date

There are a couple of client libraries that you could use to call out to an NTP server and get the date over a network connection. I've not used either of these, but two that I quickly found are: ...
heckj's user avatar
  • 138
1 vote
Accepted

tvOS game launch image shows on simulator but not on device

After multiple deletes from the device, clean and device and XCode restarts, it magically started working, though not always 100% reliably. Seems to be "one of those things".
margusholland's user avatar
1 vote

Use GKEntity's component(ofType:) with inheritance

Well it appears as if no one here seems to know it so I'll just post what I used which is a new method that I added in an extension to GKEntity (which I was ...
lsauceda's user avatar
  • 151
1 vote
Accepted

Breaking up a map so countries can be colored separately in Spritekit

There are a few methods one could use to create procedural irregular shapes that are individually capable of being colored. The simplest of these is likely to use SKShapeNode to create a Node based ...
Attackfarm's user avatar
  • 2,209
1 vote

How to move sprite as if not rotated when rotated 90 degrees?

Are you using a game engine? you didn't clarify that. (I assume you are using Unity) You should change the tetris piece's world position instead of moving in the direction of the right or forward ...
prithul's user avatar
  • 123
1 vote

Should the Sprites in my Boids implementation be backed by model objects?

Coming from a game dev perspective, I'd suggest you pursue a entity component based system (ECS) to build up your simulation. An entity is a container for components. Components represent state (and/...
Benzi's user avatar
  • 282
1 vote

How to add a bump map in scene kit?

There isn’t a built-in way to apply a grayscale bump map like the one you have; what SceneKit expects is a normal map. It’s pretty straightforward to convert one into the other, though; there’s even ...
Noah Witherspoon's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible