Questions tagged [orientation]

The directional facing of an entity in the game space.

Filter by
Sorted by
Tagged with
0
votes
1answer
32 views

Unity Gyroscope orientation (attitude) “wrong”

I am using the Unity reference and example implementation here https://docs.unity3d.com/ScriptReference/Gyroscope.html I struggle to fix an orientation problem. When my phone lies flat on the ground, ...
0
votes
0answers
36 views

Orientation is off when nearing 90 degrees rotation

Context: I am using Vive Trackers to track the head of a user. It is not a Vive headset and I am restricted to the TrackingUniverseRawAndUncalibrated, which only guarantees that the Y axis will be UP. ...
2
votes
1answer
102 views

Unity - X axis back to front

I'm using Unity 2018 and its really confusing me. I generate a plane mesh in code and when it comes to positioning (transform.position.x) it on the X axis I can't understand why moving it further to ...
0
votes
1answer
96 views

How to align 2 IMUs' quaternions?

Suppose I have 2 IMUs that output 2 quaternions. I place one IMU on my left hand and another one on my right hand. I put both my hands flat on the table and point it forward to the same direction. ...
2
votes
1answer
75 views

Aligning rotation from a imu9250 to a game object

I am experimenting with interfacing unity with real world inputs, specifically I have an imu9250, connected to an arduino clone providing rotation inputs ( either quaternion or pitch/yaw/roll) to ...
1
vote
1answer
53 views

How to Work With Arbitrarily Oriented Vectors

I'm brushing up for a pending game jam and just for kicks I thought I'd let the gravity in my 2D platformer push at an arbitrary angle. Normally gravity points downward (3 PI / 2), but if I wanted it ...
0
votes
1answer
24 views

How to orient a layer to connect 2 points AND facing the camera

here is my question, which I hope will be in general interest: If you have got 2 Points in 3D space and want a plane to connect those, you can quite easily use a function similar to "lookAt" to ...
1
vote
1answer
106 views

How to smooth rotations?

I have a semi-regularly (15fps to 60fps) sampled source of position and orientation to which I am using dead reckoning to fill in gaps. However, I would like to smooth it further to eliminate any ...
1
vote
0answers
432 views

SceneKit-Convert a rotation vector into rotation matrix

I'm very new and I'm studying this ARKit code from RPasecky/CubesInSpace on github where he/she convert the point of view 's rotation vector into a rotation matrix ...
1
vote
0answers
14 views

iOS 8 iPad Mini Orientation thinks It should be landscape despite it being disabled

I've only enabled portrait mode in the info.plist and generally the iPad Mini running my game works fine except if I quickly change its physical orientation from landscape to portrait, the app ...
1
vote
0answers
124 views

Using orientation sensor data for Android game

I'm building a game where a green box floats to different parts of the screen. The user must rotate their phone such that the blue dot intersects the green square. This is different from a standard "...
1
vote
0answers
30 views

Transform arbitrary axes to world axes

I'm in the case I need to transform a Quaternion coordinate system to a concrete one, let me explain. I'm implementing an orientation tracker for VR headsets, I have the orientation of the device and ...
0
votes
1answer
387 views

Gamemaker display orientation detection

I am making a game that needs to detect when the device gets turned over in landscape mode to landscape-flipped to change some game mechanics when the player does so. The project is already set to ...
1
vote
4answers
681 views

How can I min-max quaternions?

What I'm doing In my engine, I'm trying to implement a camera that will follow a target object, such as a player. I wanted to avoid just simply using the inverse of the target's transformation, ...
0
votes
1answer
93 views

Google Games Services Display Orientation

I'm developing a game using LibGDX and I'm using BaseGameUtils to implement Play Games Services in it. It's working very well. But my game is in landscape mode, so ...
1
vote
1answer
3k views

Finding relative x and y value on a sprite [Gamemaker]

I'm having a little conundrum that may just result from a lack of knowledge of Gamemaker's functionality. I've attached two images to aid explanation. I have a sprite of a turret (with a gun barrel), ...
2
votes
0answers
274 views

How to calculate a quaternion rotation between 2 vectors with a specific final up vector?

I know you can calculate the quaternion rotation between 2 vectors with something like this after all the optimizations: ...
1
vote
1answer
104 views

Turn the front wheels of a car according to the car's bezier path

I have a 3D car which follows a predefined 3D Bezier path. I want the car's front wheels' rotation to match the car's changing direction. I had the idea to match the wheel's orientation to the ...
0
votes
1answer
294 views

2D space combat - turn based, orientation / facing [closed]

Another rewrite - By they way thanks, because your former critics made me think of this.: I am currently building a tactical turn based combat game in space. Movement is (now) on a grid. The player ...
1
vote
1answer
98 views

Vector magnitude in orientation

First, a quick overview of my problem: I have a game entity which has a quaternion to represent its rotation/orientation. It also has a 3D vector in world space for its linear velocity. From the ...
1
vote
1answer
71 views

Torch fire always up regardless of handle direction

I have a prefab from some asset pulled into our project. It is a simple torch.. handle and a particle system for the fire. Works perfect if mounted on a wall and torch angle adjusted no problem. ...
5
votes
1answer
2k views

Unity Android Orientation Bug in Auto Rotate

I am currently looking for a workaround, or fix, for a Unity bug. I want to be able to auto-rotate my game, while respecting the Android system settings. Currently, if you set your Unity Orientation ...
3
votes
2answers
3k views

How to calculate left/right oriented angle between two 2D vectors? [duplicate]

I would like to calculate angle between two 2D vectors. Here's a picture of what I'm trying to achieve: I have an obstacle line segment AB and incoming moving PC. If I'm coming from one side C¹D¹ and ...
1
vote
1answer
765 views

How do I fix my planet-facing camera?

Summary I'm having trouble implementing a camera controller suitable for first person use around a planet. The camera needs to be oriented correctly according to gravity (vector from camera ...
3
votes
3answers
1k views

How can I reorient the axes of an object?

I spent some time in Unity yesterday trying to fire a sphere from a horizontal cylinder (like a ball from a cannon). I was using Vector3.forward, but the sphere kept coming out the top of the cylinder ...
0
votes
1answer
184 views

How can I support both multiple resolutions and multiple orientations in a game?

I am writing a mobile Android and iOS game. This game is similar to Doodle Jump, but without scrolling. In my game I display a background image that should cover the entire screen. On top of that I ...
0
votes
1answer
437 views

Relative Position/Rotation calculation

I have 2 objects each with a 3x3 Matrix (Orientation) and a Vector3 (Translation). Both are relative to world coordinates. How do I calculate the position and orientation of object B in relation to ...
1
vote
1answer
1k views

Change game from portrait to landscape dynamically

I have multiple classes that implement Screen. I want to, say, have the Main Menu screen portrait, then the Play Screen ...
3
votes
1answer
113 views

Finding the monitors orientation in XNA for Windows

Just to be clear this is not for Windows Phone 7. =) I've got some interesting requirements for a project and I'm having trouble trying to find the information I need. I have two monitors. The ...
3
votes
1answer
302 views

How to map absolute Joystick position to object rotation?

In my (Ogre) 3d scene I have an object that should be rotated locally based on Joystick input. I have a Joystick with min/max values of [-32767, 32767] on both X and Y axes. When the Joystick is in ...
3
votes
1answer
557 views

How do I determine a device's default orientation?

I am developing a game with accelerometer controls. This works well on all the mobile phones I've tested it on. However, when testing on a tablet, the y and x axes are reversed, presumably because the ...
6
votes
1answer
3k views

Quaternion Look At with Up vector

I have implemented a "look at" method for my screen elements and it almost works how I want it to work. The ScreenElement class uses a R3 Vector and a Quaternion to determine the position and ...
19
votes
4answers
11k views

Why is Y up in many Games?

I learned at school that the z-axis is up. It is the same in modeling software like Blender. However in many games the y-axis is up. What is the reason?
2
votes
2answers
6k views

convert orientation vec3 to a rotation matrix

I've got a normalized vec3 that represents an orientation. Each frame of animation, an object's orientation changes slightly, so I add a delta vector to the orientation vector and then normalize to ...
11
votes
2answers
9k views

How is the gimbal locked problem solved using accumulative matrix transformations

I am reading the online "Learning Modern 3D Graphics Programming" book by Jason L. McKesson As of now, I am up to the gimbal lock problem and how to solve it using quaternions. However right here, ...
3
votes
1answer
222 views

How to make an object stay relative to another object

In the following example there is a guy and a boat. They have both a position, orientation and velocity. The guy is standing on the shore and would like to board. He changes his position so he is now ...
3
votes
0answers
541 views

Setting Orientation of Character in Bullet/Ogre [closed]

I've been suffering from an issue regarding the implementation of orienting characters in a game I'm implementing using Ogre3D and Bullet physics. What I have: A Direction Vector that the character ...
3
votes
1answer
554 views

How can I use orientation to compute position in Windows Phone 7? [closed]

I'm using the motion API and I'm trying to figure out a control scheme for the game I'm currently developing. What I'm trying to achive is for an orienation of the device to correlate directly to a ...
12
votes
4answers
7k views

X, Y, Z coordinate standards?

I'm pretty new to 3D development of any kind, nonetheless games. As I read through tutorials and examples, I find that the X/Y/Z coordinates seem a bit backwards than my first guess. I had imagined ...
8
votes
1answer
3k views

Rotate object to face player

This is probably a simple vector question, but I'm not sure how to do it. I have an object at vector position (ox,oy). Potentially every update, the user walks ...
3
votes
1answer
242 views

Follow point of interest by applying torque

Given a body with an orientation angle and a point of interest or targetAngle, is there an elegant solution for keeping the <...
9
votes
1answer
801 views

Changing orientation by applying torques

Suppose you've got an object floating freely in space. You have a vector you want this object to point towards, and a vector representing the direction it's currently facing. From these two, you can ...