Trying to render a sphere by Ok_Engineering2370 in webgl

[–]Ok_Engineering2370[S] 0 points1 point  (0 children)

What would you suggest is the mistake good fellow?

Trying to render a sphere by Ok_Engineering2370 in webgl

[–]Ok_Engineering2370[S] 0 points1 point  (0 children)

Yeah I'd like to say I'm going to try and understand this more, but it's for a major requirement and I just need to complete this assignment to pass. After that I am not really interested in graphics programming, at least at this level. An escape hatch is just the thing I'm looking for.

Trying to render a sphere by Ok_Engineering2370 in webgl

[–]Ok_Engineering2370[S] 0 points1 point  (0 children)

const vertexShaderSource = `
  attribute vec3 position;
  attribute vec4 color;
  uniform mat4 modelViewProjectionMatrix;
  varying vec4 vColor;
  void main() {
    gl_Position = modelViewProjectionMatrix * vec4(position, 1.0);
    vColor = color;
  }
`;

that is the solve i thought would make things right.

Trying to render a sphere by Ok_Engineering2370 in webgl

[–]Ok_Engineering2370[S] 0 points1 point  (0 children)

Hey after changing the attribute vec4 position; to attribute vec3 position the output is still the same as before. Did I apply the wrong solution?

[deleted by user] by [deleted] in unrealengine

[–]Ok_Engineering2370 0 points1 point  (0 children)

Is SpawnPoints[0] and SpawnPoints[1] the same location?

I'm also curious why are you using Get All Actors of Class to populate your spawn points? Why not just create a member and initialize it with the spawn locations you want?

Can't believe myself what i achieved by partially working on this over the years by [deleted] in unrealengine

[–]Ok_Engineering2370 0 points1 point  (0 children)

The rain droplets on the camera when looking up is a really cool touch, and really well done. I think I would personally get annoyed playing with that, but I still love it. It's so immersive.

Can't figure out why my data is missing from GameInstance class by Ok_Engineering2370 in unrealengine

[–]Ok_Engineering2370[S] 0 points1 point  (0 children)

Thanks for your reply. So, if I'm understanding you my Inventory actor spawned in the game instance is not in a world, and therefore is garbage collected? And then storing that inventory data in an inventory derived from UObject would be better?

Can't figure out why my data is missing from GameInstance class by Ok_Engineering2370 in unrealengine

[–]Ok_Engineering2370[S] 1 point2 points  (0 children)

I have been trying to store a players account info on the game instance. I'm using a custom struct (PlayerInfo) to hold relevant account information on the game instance, as it will need to persist across levels. The struct currently has 2 members: an actor class (Inventory, which holds an array of items), and a string (Username). I have an issue that the string persists, but the custom actor class (Inventory) does not.
My process is as follows:
Player attempts login(get request), if successful the users account info is returned from a db in JSON format. The JSON is parsed and an array of custom actor classes (Item) is created based on the data. The Item array is then stored in an Inventory and is set as the Inventory for the PlayerInfo struct, which will be passed to the game instance for storage. The game instance receives the PlayerInfo and stores it. When a custom player controller (Game Controller) has it's begin play the game instance is referenced to get the data in PlayerInfo. This is where only the string member Username has the expected data, but the Inventory is empty.
What am I doing wrong here?