Zetar's Recent Forum Activity

  • I would try something like

    Apply Physics force 30 + Sprite.speed toward (Mouse.X, Mouse.Y) at image point 0

    But I don't know if it would work...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I am doing something similar. I applied Bullet behavior to the moving sprite, then when I click I spawn a mover marker and have an event telling the sprite to set speed to 50, and set angle(Sprite.x, Sprite.y, MoveMarker.x, movmarker.y). Then upon arriving at movmarker, destroy marker and set speed 0.

  • OK, So now I want to get a Distance value between two stars. I have Local PlotX, PlotY and PlotZ values for each star instance. These are recorded when the star is placed in the Isometric spinning Star map. When you left Click on one star it records the instance and pulls those values. Then you click on a star with the right mouse button and it pulls a second set of coordinates. The Distance Global variable then tallies the distance. But if Global DistanceAB is Negative, it says NaN (because of sqrt I think)...   How can I get that value regardless of whether the value is + or -...

    Take a look. It is kinda cool looking... (Think about the cool spinning art you could create with this principle...)

    http://www.box.com/s/se75ku9mcgxxa5kevdkl

  • The math isn't too complex:

    http://dl.dropbox.com/u/5426011/examples%208/zrotate.capx

    If you want it to just rotate relative to the screen remove the "set y" actions.

    THAT IS EXACTLY WHAT I WANTED!   Very clever. Thanks ROJOhound! <img src="smileys/smiley32.gif" border="0" align="middle">

  • <img src="smileys/smiley36.gif" border="0" align="middle" /> - I thought you would say that. Never mind :) <img src="smileys/smiley36.gif" border="0" align="middle" />

  • WOW - Tom, that is amazing that you could transfer that system! I was looking for some info from that forum, and now I can get to it. YEA! Good Job Mate!

  • Lets say I want to make an Isometric "3D" star map that I want to rotate. I want it to appear that all points on this "map" rotate around the y axis as the map turns. This involves Isometric Projection mathematics...

    Has anyone worked out how to translate this math into Construct 2 yet?

    I was thinking of using the "math" to translate sprite x,y,z (isometric) to x,y (Construct Canvas) as the map rotates. I imagine it would be a complex event structure...

    I would probably give a sprite local variable ISOx, ISOy, and ISOz for Isometric point in space, then ProjX, and ProjY for the 2D projection position on the layer.

    Then I guess I would have to calculate at what angle the map was facing isometrically, and use that to calculate ISOx, ISOy, and ISOz. Then use Isometric projection to translate the "false" x,y,z to ProjX and ProjY...

    Am I on the right track? Anyone want to help me figure this problem out?

  • Thanks again Yann. Looks like I was using wrong mass :)

    A very good example for physics. This capx could be useful for many projects.

  • Ok, Yann. I removed the set events, but I am not getting a result. In my game I have Global gravity off and a constant 5 force down on the sprite. Does that effect it? what did I do wrong? Here is a capX to tweak...

    Black Hole Example

  • Man, Yann! You never cease to amaze me...    Thanks everyone - that should work great.

  • This had to have come up already, but I cant find it...

    I want a black hole to change the physics path of a moving object.

    I have an Sprite moving across screen, passing near black hole using physics:

    Every Tick

    -> "SPEED"=Distance(0,0,Sprite.physics.velocityX,Sprite.physics.velosityY)

    -> "DISTANCE"=Distance(BlackHole.x, Blackhole.y, Sprite.x, Sprite.y)

    Sprite.Distance <500

    -> Sprite Apply "FORCE" at angle(sprite.x, sprite.y, Blackhole.x, blackhole.y)

    QUESTION - How do I calculate "Force" so that it is stronger proportionally to the distance of the hole as the sprite gets closer. I have racked my brain, but cant get it.

    Help Please...

  • Ohhh... Great Idea!   I could use something like that...

Zetar's avatar

Zetar

Member since 19 Dec, 2009

None one is following Zetar yet!

Trophy Case

  • 15-Year Club
  • Email Verified

Progress

16/44
How to earn trophies