Skip to main content

Questions tagged [position]

The tag has no usage guidance.

0 votes
2 answers
39 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 ...
Nightmare Games's user avatar
0 votes
0 answers
43 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 ...
user57129's user avatar
  • 121
0 votes
1 answer
235 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 ...
user57129's user avatar
  • 121
0 votes
1 answer
63 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'...
Matías Cánepa's user avatar
0 votes
1 answer
93 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 ...
A__'s user avatar
  • 163
0 votes
1 answer
63 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: ...
Probes's user avatar
  • 1
0 votes
1 answer
38 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: ...
Maxim Gershkovich's user avatar
0 votes
1 answer
95 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 ...
Jason Burley's user avatar
2 votes
0 answers
60 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 ...
Anixias's user avatar
  • 23
0 votes
1 answer
51 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 ...
G.Pap's user avatar
  • 3
0 votes
1 answer
39 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 ...
Đạt Phạm's user avatar
0 votes
1 answer
265 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 ...
Arian_ki's user avatar
  • 691
0 votes
1 answer
424 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 ...
CitiZen's user avatar
0 votes
0 answers
74 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 ...
Michael Macha's user avatar
1 vote
1 answer
61 views

Get local position of a skinned vertex

I have a formula for skinning, where a vertex is attached to 2 joints with some proportions: B = M1*A*K1 + M2*A*K1 Where: K1 and K2 are the proportion ...
Dmitry Logov's user avatar

15 30 50 per page