Questions tagged [position]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
37 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
39 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
110 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
72 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
57 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
37 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
80 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
59 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
49 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
38 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
232 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
357 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
72 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
58 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
0 votes
1 answer
102 views

Cannot retrieve accurate position of moving basepart

I am stopping a moving player model in its tracks and would like to get its position. Here is my test: target.HumanoidRootPart.Anchored = true target.Humanoid.PlatformStand = true while wait(5) do  ...
Daegod's user avatar
  • 101
2 votes
1 answer
604 views

How can I keep a node in-place while I re-parent it?

I have an object that needs to follow various Path2D paths in my scene. To do this, when it needs to follow a path, I re-parent it to a ...
yoozer8's user avatar
  • 1,134
0 votes
0 answers
73 views

How to predict future position of body in solar system?

I have a solar system where each body interacts with each other by force F = Gm1m2/R^2 Is it possible to predict future position of some random body after t seconds since bodies velocity and position ...
Robotex's user avatar
  • 251
0 votes
1 answer
127 views

How to check if a point is on the plane given bottom-right point, top-left point, normal and the quaternion rotation of the plane

I know the world positions of A and B. We are also given the vector normal and the quaternion rotation of the plane How do I check if a point lies on the plane?
MrRobot9's user avatar
  • 321
2 votes
1 answer
1k views

Unity: How can I find the center position of a particular triangle?

I need to face an object from a central point directly through any one of many triangles which are faces on an icosphere whose position is centered on that point. Is there a way to get the center ...
Truth's user avatar
  • 135
2 votes
1 answer
5k views

World position into local position

I want to understand how I can convert world position of an object into local position. Especially how to deal with a rotation of objects. I'm testing transform.InverseTransform(...) methods. When ...
Ardoos's user avatar
  • 29
0 votes
1 answer
381 views

Text mesh not visible on a container

I have probably dumb problem with a text-mesh game object. I want to use it as a title on a top of container. I will give you all information that you need to find a problem. I'm using pixel font <...
Robert's user avatar
  • 21
0 votes
1 answer
702 views

How to convert relative position of child to parent into an absolute position?

I am modifying a game that stores object positions with a 3d vector { x, y, z } and rotation as a 3d vector with degree angles ...
Tyler Hallada's user avatar
0 votes
0 answers
375 views

How to properly resize canvas according to screen size? (Javascript)

So, as the question says I need to resize the canvas according to screen size. However the thing is that that's not it. I also need to have the mouse coordinates updated proportionally. Seems like I ...
Nirabhra's user avatar
0 votes
1 answer
44 views

Trouble Positioning Object In World

I have a lightning effect that travels from point A to point B, I am having trouble placing placing point B correctly. As you can see from the object hierarchy the points (LightningStart, ...
Pheonix2105's user avatar