Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 25 2018 05:01
    OxyDeadbeef opened #5
  • Jun 22 2018 20:25

    alteous on master

    Release 0.4.0 Merge pull request #4 from alte… (compare)

  • Jun 22 2018 20:25
    alteous closed #4
  • Jun 22 2018 20:16
    alteous synchronize #4
  • Jun 22 2018 20:16

    alteous on v0.4

    Release 0.4.0 (compare)

  • Jun 22 2018 20:13
    alteous opened #4
  • Jun 22 2018 20:12

    alteous on v0.4

    Release 0.4.0 (compare)

  • Jun 22 2018 19:50

    alteous on master

    Update cgmath and mint. Merge pull request #3 from plop… (compare)

  • Jun 22 2018 19:50
    alteous closed #3
  • Jun 22 2018 19:50
    alteous commented #3
  • Jun 21 2018 21:54
    OxyDeadbeef opened #3
  • Apr 27 2018 17:41
    alteous commented #2
  • Apr 26 2018 04:28
    swiftcoder opened #2
  • Jan 07 2018 12:17

    alteous on master

    Bump crate version to 0.3 Implement MulAssign for Quat Add Quat::rotate (compare)

  • Jan 07 2018 11:32

    alteous on master

    Mat::invert -> Mat::inverse Add Quat::euler impl AddAssign for Vec and 8 more (compare)

David Harvey-Macaulay
@alteous
Hello world!
Ilya Bogdanov
@vitvakatu
Hi!
How are you? :)
David Harvey-Macaulay
@alteous
Great! Finally got some spare time for open-source. :smile:
Ilya Bogdanov
@vitvakatu
Glad to hear that :D
Ilya Bogdanov
@vitvakatu
@alteous so what's going on with my code? :)
Do you have any ideas?
alteous @alteous is investigating
David Harvey-Macaulay
@alteous
I'm confused about your orientations.
Oh, I see what's going on now, never mind.
Ilya Bogdanov
@vitvakatu
Okay
I see it
It's just scene graph update
Or not
wat
David Harvey-Macaulay
@alteous
This is certainly weird...
I'm still investigating/debugging
Ilya Bogdanov
@vitvakatu
For a second I thought that I've found the problem
But not
David Harvey-Macaulay
@alteous
It might be the implementation of Quat * Quat.
David Harvey-Macaulay
@alteous
No, it's OK.
What's the point of mesh.set_orientation(Quat::from_angle_y(Rad(PI)));?
That mirrors the spaceship over in the Y axis in the XY plane.
Ilya Bogdanov
@vitvakatu
Yep, it was a problem with mesh vertices
I've fixed it and removed that line, no changes in rotation
David Harvey-Macaulay
@alteous
To clarify, the math is OK?
Ilya Bogdanov
@vitvakatu
I mean, the rotation is still weird
Here is the changes if you're curious vitvakatu/asteroids@a76232a
David Harvey-Macaulay
@alteous
Heh I literally just made the same change, byte-for-byte.
Great minds think alike, eh?
Ilya Bogdanov
@vitvakatu
Ahah
Great minds can't solve problem for over a half an hour
Doesn't sound great :D
David Harvey-Macaulay
@alteous
Fixed it.
- mesh.set_orientation(Quat::euler(vec3!(0.0, PI, 0.0)));

This only confuses matters. You've already fixed the vertex winding order.

- let new_orientation = Quat::axis_angle(vec3!(1.0, 0.0, 0.0), self.rotation) * self.orientation;
+ let new_orientation = Quat::axis_angle(vec3!(0.0, 0.0, 1.0), self.rotation);

You don't need this extra multiplication. Now the rotation around the Z axis behaves as intended.

+ let mut dv = new_orientation.rotate(vec3!(0.0, 1.0, 0.0));

This now behaves as intended, although I'm not familiar enough with quaternions to know if this should actually work.

Ilya Bogdanov
@vitvakatu
yep, it works!
Thank you so much
I'm not sure I really understand why it was working with cgmath before
David Harvey-Macaulay
@alteous
My pleasure. :)
Neither am I lol.
You need to swap these signs:
if input.hit(three::Key::A) {
    self.rotation += SHIP_ROTATION_SPEED * input.delta_time();
}
if input.hit(three::Key::D) {
    self.rotation -= SHIP_ROTATION_SPEED * input.delta_time();
}
If you graph on paper, the rotation angle is correct (anti-clockwise for increasing rotation around Z axis).
Ilya Bogdanov
@vitvakatu
Yep, I've already fixed it :wink:
David Harvey-Macaulay
@alteous
I'll release 0.3 later.
David Harvey-Macaulay
@alteous
0.3 has been released, FYI.
Ilya Bogdanov
@vitvakatu
:+1: