GithubHelp home page GithubHelp logo

Changing the ship shape about erkie.github.com HOT 8 CLOSED

erkie avatar erkie commented on August 16, 2024
Changing the ship shape

from erkie.github.com.

Comments (8)

erkie avatar erkie commented on August 16, 2024

Try changing the "this.dir = new Vector(0, 1);" line.

I think pointing to the left would be "this.dir = new Vector(-1, 0);"

from erkie.github.com.

variable avatar variable commented on August 16, 2024

var playerVerts = [[-1 * playerWidth/2, 0],[-1_playerWidth/4,0],[-1_playerWidth/4,-1_playerHeight/4_3],[playerWidth/4,-1_playerHeight/4_3],[playerWidth/4,0],[playerWidth/2,0],[0,playerHeight/4*3]];

from erkie.github.com.

variable avatar variable commented on August 16, 2024

Hi erkie,

I need the arrow to point down, currently is pointing left which is not what I want.

Cheers

James

from erkie.github.com.

variable avatar variable commented on August 16, 2024

I made this.dir = new Vector(0,0); it points down, but it won't move and the flame is on the wrong side :)

from erkie.github.com.

erkie avatar erkie commented on August 16, 2024

The flame is drawn at a fixed distance from the object. You'll have to look into the drawFlame-method of the ctx-object.

from erkie.github.com.

variable avatar variable commented on August 16, 2024

I changed to this.dir = new Vector(0,0); the ship is correct position, but the ship won't move and the flame is in wrong angle... What else should I change please?

from erkie.github.com.

variable avatar variable commented on August 16, 2024

LMAO, I think I know it... I created the verts based on x,y, but it's actually y,x

from erkie.github.com.

erkie avatar erkie commented on August 16, 2024

I think that's a bug (or strange design decision by me), but yeah, sorry about that.

from erkie.github.com.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.