All Questions

0
votes
1answer
41 views

How to know which child collider triggered in parent?

I have parent object with 3 children. Each children has one collider (BoxColliders actually) marked as triggers each one. I want to know in a OnTriggerEnter on the parent side which collider was hit. ...
1
vote
1answer
33 views

Handling RPG (rocket launcher) launcher and rocket

In my game, the player has an RPG (rocket launcher). Using this launcher, he can shoot a rocket. When shown in the inventory, the rocket is stuck in the launcher. Also, when the user walks, the ...
0
votes
1answer
39 views

Sebastian Lague 2D Platformer Controller 'Continue' Problem

In episode 10 of Sebastian Lague's "[Unity] Creating a 2D Platformer" series, he creates a jump through platform by using "Continue;" in his vertical collisions script. This worked great for a jump ...
2
votes
1answer
36 views

How do I correctly show both sides of a plane in Unity?

I am trying to show both sides of a mesh. I understand this question has been asked a lot, but all of the answers I've found seem like they're written for Unity 5 and I can't find a "Cull" setting on ...
1
vote
1answer
41 views

How to fill a 2d array with elements of a 1d List

I have a 2d array for 'Slots' in my inventory screen (slot width: 150px; total slots is based on width and height of inventory panel currently at 1500x600). The slot holds a reference to the ...
0
votes
0answers
9 views

How do I change the animations for Ellen in the Unity 2D GameKit

I'm using the 2D GameKit, and want to change Ellen into the sprites and animations I've created. How can I add my animations? I can't find anywhere that the animations are referenced in her properties ...
0
votes
2answers
41 views

How to get projectile direction vector in a 2d grid?

I am having trouble figuring out how to trace the path of my projectiles in an Asteroids clone. Currently the ship is locked to the center of the screen and can be rotated a full 360 degrees. I know ...
0
votes
0answers
29 views

The X axis becomes the Y axis after a quaternion rotation

I am making a FPS game, and I have a for loop where I place out "ground" objects. (pseudo code) ...
2
votes
2answers
169 views

How to disable BoxCollider2D on all prefabs?

I made a prefab that when hitting one object will disable it's box collider2d and enable it after hitting a different object. It works find when there's one prefab, but when there's move, it only ...
0
votes
0answers
11 views

Error comparing Input.GetTouch () .phase with TouchPhase.Began

In the update method I'm using unity's touch, as you can see in the code. ...
0
votes
0answers
23 views

Action never fires

I have a method, which runs the action MenuScreen at the very end. It never fires. Why is that? ...
0
votes
1answer
43 views

Overlap detection does not work correctly when there is more than one warrior colliding with the tower

I have a project where warriors are generated and they follow a route. In this route has a tower, when a warrior overlaps that tower, it takes 5 of it life, and he does it every 1 second. Code of the ...
0
votes
3answers
106 views

How to stop player when game over?

problem is when game over myplayer not stop?? ...
0
votes
1answer
30 views

Rigidbody character rotation

How could I rotate my character that I'm using a rigidbody to move. I tried using transform.eulerAngles and changing those but the camera feels very jittery.
0
votes
0answers
18 views

how to move the rect transform by mouse drag

I am trying to do a slider in the UI with the mouse, I want to move the rect transform right side when I drag the mouse right and vice-versa. I tried but it didn't work please help me thanks in ...
1
vote
1answer
24 views

Smooth shading along edges with duplicate vertices

On this generated mesh, I have sharp edges, because each square has duplicate vertices separate from its neighbours. I can't remove the duplicate vertices because I'm using them to provide unique UV ...
2
votes
1answer
29 views

On changing a voxel, don't recombine everything again, only modify the changed parts?

I'm working on a voxel based game, where destructible structures are made out of cubes. (Some of them has 3000 voxels) I solved the framerate issues by combining them, but after making it able to ...
-1
votes
0answers
25 views

Trying to understand quaternion rotations

So I have been making a FPS game where I want a weapon to follow the camera, and the weapon should rotate in the direction the camera is looking. I have been using normal euler angles for this, but ...
3
votes
1answer
79 views

Shader is distorting a Texture of a sprite it's working on

I've been testing out fragment shaders in SFML, trying to learn how to write and use them and I've run into a recurring problem. Every shader distorts the texture. Top left is the distorted test ...
2
votes
1answer
48 views

How do I rotate individual shapes on an html5 canvas?

So I am doing a basic Asteroids clone as an intro to HTML5 canvas. I want to be able to rotate the main player while leaving the other objects on screen alone. Currently I am using transform and ...
0
votes
1answer
80 views

Destroy chunked block like Minecraft

I am trying to do a Minecraft-like game (like every one have already tried I guess) and i went across the problem i expected: lag with world Generation. I did lot of searching but i can I tried to ...
0
votes
1answer
50 views

Nonsense error in the overlap between 2 warriors and a tower

I have a project where 1 warrior is generated every 5 seconds. This warrior as it is generated tries to follow a path that contains 4 target points. Between the target point 1 and the target point 2 ...
-1
votes
0answers
39 views

Is there a way to include dice rolls in damage formula wihtout using plugins?

I'm wondering is there any way aside from plugins to put in randomness into damage formulas? For example if you have a skill that does 1 to 1000 minus b.def damage? (If there is a way how should such ...
0
votes
1answer
53 views

Snake game steering with Java FX

I am currently trying to make a snake game with Java FX, I read several posts about it and I understand on theory how to move the snake body (for each part of the snake reference the previous one and ...
1
vote
3answers
76 views

Unity, check if all GameObject tagged are destroyed

Hello im a total noob so please dont blame me. So, I have this code but I cant find a fitting answer on how to check if everything tagged "Target1" is destroyed. Most of the answers are either ...
0
votes
1answer
9 views

Exported shapekeys to unity don't play correctly (unity 2019 + blender 2.79)

Hopefully someone can shed some light on this I select all relevant parts of the mesh and armature etc and export to FBX 7.4 for use in Unity3d The model itself displays fine and so does the armature ...
0
votes
1answer
125 views

How could I implement an ECS in C? [closed]

I'm looking into how to do a game engine using only C and wanted to know how to implement ECS in C. I didn't find any ECS implementation for C, it only seems to exist for C++. So I'm wondering... Is ...
0
votes
0answers
37 views

Update position using animation curves

Implementing the suggestions from this answered question, I am trying to move my player according to the animation. To do so, I am adding the transform.position property to the animation and then, ...
0
votes
0answers
24 views

Can I give vehicles its real names? (e.g. Skoda, Tatra) [duplicate]

I'm working on a simulator of old USSR transport. But my boss is telling me that I can't put real names on vehicles, but don't get me any proofs of it. I know that you can't put real human names and ...
0
votes
0answers
17 views

Unity - How to add bones to procedural mesh

Basically this is the set up: An N amount of prefabs are bundled together into a new GameObject. This is then merged into a single main mesh composited of M amount of material submeshes. The shape is ...
1
vote
0answers
38 views

Framerate limited by lack of mouse movement?

Using Torque, it appears that the program is running at around 25fps when the mouse is still, but as long as I keep the mouse moving, the framerate can hit well over 300fps. What in the world would ...
1
vote
1answer
58 views

How to implement a slight skid in a car game

I have a top down car game, where I'm trying to allow a slight skid; I've tried the following code to calculate the X and Y, but there is no skid whatsoever: ...
0
votes
1answer
37 views
0
votes
0answers
56 views

My gameObject does not move, when it returns to its original scene

I have a map where I have a 2d Ship as gameObject, which can be dragged with the finger to travel between islands and do the corresponding activities, when the player finishes playing on the island he ...
0
votes
1answer
45 views

Having some trouble with my frustum checking code

I'm trying to check if a bounding sphere is either within or intersecting my frustum. It mostly works but there are cases where it should and it doesn't. The frustum is made up of 6 planes which have ...
0
votes
0answers
45 views

How to make overlap detection more accurate?

I have a project where there are two types of warrior, red and blue. When they overlap, both are destroyed, or at least that is what should happen. Red Warrior Blueprint (code of destruction): This ...
-1
votes
1answer
40 views

How do I fix this “identifier is not declared in the current scope” error?

I got this identifier inputevenmousebutton is not declared in the current scope; should I use another identifier? ...
0
votes
0answers
24 views

Why occlusion culling isn't working?

I've bought a 3d model from a 3d marketplace. It is a big interior scene. I've imported the single FBX into Unity, added some collider, changed materials (6-7 materials) etc. There are hundreds of ...
2
votes
1answer
27 views

How can I child one sprite to another?

I am a newb at GameMaker. I have a 2D map which you can move around. I want to add pins to the map, such that when the map moves, the pins stay in the same position relative to the map. By default, ...
1
vote
1answer
43 views

Strange artifacts in Unity Lightmaps

I experienced this weird lightmapping bug in my game that causes some models to have glowing artifacts on their surface. These artifacts "move" around, when I edit the UVs of the model in Blender, so ...
3
votes
2answers
61 views

How can I play a particle system only when it's visible?

I am making a game and it has a lot of particle systems in it as special effects, and all of them are supposed to be playing at the same time, but doing that will be heavy on the game's performance, ...
0
votes
1answer
23 views

Can't Transform.SetParent in Unity

i have a problem that i don't understand why is happenning and it's driving me mad. I'm trying to code a script to put the player in the car by disabling the third person controller and then Transform....
1
vote
1answer
37 views

Are realtime lightning calculated every frame , also the ones not 'visible'?

I've a big scene, with a lot of realtime light. I noticed a big drop in FPS after finished to add lights, so I suppose that too many realtime light are a 'bad practice'. But my question is: are all ...
0
votes
1answer
88 views

How to change music from room to room?

In Unity 2019.3.0a2 I have a labyrinth with multiple rooms. I want the music to change when I get from one room into another. How can I do it so that music from room 1 is only hearable in room 1, and ...
2
votes
0answers
43 views

How to create landscape image from 2D map?

I created a 2D map using Perlin Noise. Based on the value on x,y, I determine an altitude and so a color to apply to my map (8 levels map). Now, I don't want my player to see the map but I would like ...
9
votes
2answers
2k views

Is there a name for this technique to put the tiles on the corner of a level?

A very common approach in development of old games is to put the tile set on the corner of a level, to use it as a reference. For example: On this level, the developers put a set of tiles in the ...
0
votes
1answer
90 views

Fixing error(23, 2) Error parsing expression, misplaced: func

When I try to use the GDScript code below, Godot gives me the error: error(23, 2) Error parsing expression, misplaced: func Why am I getting this error, and how can I fix it? Is there another ...
1
vote
1answer
17 views

Behaviour of containers in Phaser 3 framework

I don't understand the behaviour of containers in this example: Phaser example The part I don't unerstand is line 41. Why is lastContainer assigned to newContainer? In line 40, newContainer is added ...
2
votes
2answers
272 views

How can you tell if what you're buying is legal?

In the past few days I've been browsing 3D asset marketplaces and repositories (I've been doing it for ages, but a lot recently). Many assets are paid for, others are free. In the past few days I've ...
0
votes
0answers
19 views

White shadow map

I am implementing the shadow map with OpenTK and c#, I do everything as expected but I always got a white shadow map if I render it to a quad. First I initialize the frame buffer object ...

15 30 50 per page