Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8783163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:45:34+00:00 2026-06-13T20:45:34+00:00

I am trying to make a simple airplane flying game. I’d like the users

  • 0

I am trying to make a simple airplane flying game. I’d like the users arrow-keys to rotate a plane around a 360 degree area where up and down is a relative Y-axis to the horizontal position of the airplane. The left and right arrows should just spin the plane around it’s z axis and allow for it to have a new Y-axis position. My question is – how can I rotate the airplane in a Y-axis that is relative to the new horizontal position?

I have a group called airplane and have done stuff like airplane.rotation.z (for left and right) and airplane.rotation.x (for up and down) – but the x axis isn’t along the new horizontal plane. I’ve also tried accessing the model/mesh within the group with airplane.children[1].matrix.rotation.x to see if this can change the relative Y-axis…This results in the same problem however. How do I find the relative Y-axis to it’s current horizontal position?

My code can be seen on jsfiddle here

Any help would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T20:45:36+00:00Added an answer on June 13, 2026 at 8:45 pm

    Quite frankly, I am having a very difficult time understanding your question, but I think your question is: “How do I use the arrow keys to rotate an object around it’s internal z- or x-axis?”

    A routine like this one will do that:

    var _q1 = new THREE.Quaternion();
    
    function rotateOnAxis( object, axis, angle ) {
    
        _q1.setFromAxisAngle( axis, angle );
        object.quaternion.multiplySelf( _q1 );
    
    }    
    

    This routine uses quaternions for implementation. This is really no big deal — you just need to set:

    object.useQuaternion = true;
    

    Here is an updated fiddle: http://jsfiddle.net/Lc8gH/20/ .


    EDIT: You can now use Object3D.rotateOnAxis( axis, angle );

    three.js r.58

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a simple browser game without relying on anything fancy like
Trying to make simple minesweeper game in python, but have one problem. I have
Trying to make a simple number clicker control for BlackBerry 6/7, like this: At
Trying to make a simple program to catalogue books. Something like this, for example:
Trying to make a simple program to catalogue books. Something like this, for example:
I am trying to make simple SFTP connection and would like to perform simple
im trying to make a simple game on cocos2d box2d, its basically got two
I am trying to make a simple 3D game for windows with XNA and
I am trying to make a simple image rotator that will rotate through a
Background: Trying to make a simple drop the ball game. The code is located

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.