Questions tagged [position]
The position tag has no summary.
26 questions
0
votes
1
answer
116
views
Teleport to random point behind Camera and within boundaries
I'm creating a third person game with companions following the player. The companions have a mechanic in which if they are too far away from the player and out of camera view, they'll be teleported ...
0
votes
2
answers
146
views
Trouble setting camera position in Unity
I'm attempting to set the camera position in Unity through code. I have a simple 2D game and there's not much programming so far. I've attached a script to the camera, and in that script I've added ...
0
votes
0
answers
131
views
How to obtain the Position on the screen (Vector2) of the Position of an object in the world (Vector3)?
I have been searching around for a solution to this but still haven't been able to use it or find it, the thing is i need the Screen Position of an object that is being seen, for this i have three ...
0
votes
2
answers
632
views
Test if a point is inside a 3D cuboid, given the 8 corner positions, through code
I'm trying to find to obtain if a point, let's call it "v" is inside a cuboid which every corner position named P1 to P8
I am trying to achieve this and in fact found some answers in some ...
0
votes
1
answer
95
views
Optimal position detection for character
In a classic fighting game like Mortal Kombat, character A is on the left facing right and character B is on the right facing left.
At some point the characters can swap positions and hence where they'...
0
votes
1
answer
154
views
GameObjects loaded from OBJ files have inherent position offsets; any way to measure these in worldspace?
I have OBJ files that I'm loading into my scene at runtime. They all have positions offset from zero.
These positions appear to be inherent to the .obj file as they were set in the 3D modelling ...
0
votes
1
answer
114
views
How do i put an entities x,y and z coordinates to a variable(?) in Blitz3D?
I'm making a TEST 3d platformer where the camera follows the player from above. Normally I would make the camera move at the same time when the player moved, for example:
...
0
votes
1
answer
64
views
How to correctly position a set of cuboids based on a direction property in MonoGame
I am trying to create a map for my game using a list of cuboid sections that are defined like this:
...
0
votes
1
answer
142
views
Align Relative Portal Camera Position
I've been having a bit of trouble with this small piece of code. To set my relative PortalCam position, I first take the distance and angle from the Portal and Player Cam. Then apply the distance and ...
2
votes
0
answers
84
views
Audio emission from a polygon instead of a point
I'm developing a 2D game in Godot. The engine doesn't matter in this case.
Given a polygon, convex or concave, and a listener (camera) location, what 2D position should an audio emitter be placed at ...
0
votes
1
answer
92
views
Changing Coordinate Origin [From Coord System A -> Coord System B]
I'd really appreciate some help on this one.
Given 2 coordinate systems A and B where
xA is an initial Vector3 position, rA is an initial Quaternion rotation
xB is an initial Vector3 position, rB is ...
0
votes
1
answer
73
views
I did changed the text of a graphical text and set its new center origin. Should I reposition it in dead center again?
Should I re-position a graphical text in the dead center again, which I previously do, after editing the text of the graphical text, recalculate its new center origin of the text? I did see that with ...
0
votes
1
answer
335
views
Bottom-left cell position is incorrect?
I need to get the position of the bottom-left cell on my tilemap. I used Floor.CellToWorld(Floor.cellBounds.min) (Floor is the name of my tilemap) and I used Gizmos ...
0
votes
1
answer
654
views
Get index of chunk in flattened 2d array from world position
I have a world which is divided in chunks and saved in a flattened 2d array. The world is currently 80 units wide and high, and each chunk represent a 20x20 unit area.
This gives that in my flattened ...
0
votes
0
answers
119
views
How can I snap a mesh to the grid, on dragging it into the scene, in Unity?
I've got a game that involves voxel-like game object management. Each voxel object snaps to the integer coordinates in Unity's scene, at play time—easy enough to do in the ...