na_irichards's Forum Posts

  • everything works. Thanks! Sorry for wasting your time lel.

  • did you already make the numbers negative on the template?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • it continues to flip upside-down. All I did was change the values back to what you said. What else can I do?

  • The camera is now flopping around, it's rotating 360 degrees and i'm not making any progress through troubleshooting. What I have is this:

    https://dl.dropboxusercontent.com/s/jmz49tj59mffc8p/test.c3p

    can you explain what i'm doing wrong?

  • To do the tilt you can change the up x/y/z with the look at action. Simplest way to change it is to use spherical coordinates. By default the tilt should be -90 (or was it 90?) and you’d add the angular speed to that. I don’t know if the car behavior can give you that but you can calculate a signed angle difference with the previous frame to get that.

    Here is basically what you’d do. With variables to calculate the steps.

    Diff = car.angle-prevAngle
    PrevAngle = car.angle
    Factor = 1
    Tilt = -90+Factor*angle(0,0,cos(diff),sin(diff))
    Up X = sin(tilt)*cos(car.angle)
    Up Y = sin(tilt)*sin(car.angle)
    Up Z = cos(tilt)

    If the view is upside down, replace -90 with 90. If it tilts the wrong way, make factor be negative. You can change the value of factor to make it tilt more or less.

    would I put this in a snippet or in a full file?

  • another quick question; doesn't really belong here but may as well continue the discussion; What would I do if I wanted to have the camera shift angles veeerry slightly when the character turns, just so you can see slightly where you're turning before hand. I don't exactly know how to wield the rotate camera action yet.

  • thanks for the fast reply! It works well, but it does need a bit of tweaking like you said. Regardless, Thanks!

  • So I'm trying to create a mario kart type of game, but I'm having difficulty getting the camera to do exactly what I want. It keeps zooming in and out, and looking up and down slightly. That might be nice for some people, but I don't need that. I just want it statically looking behind the player. What parameter for the 3D camera controls this? The camera code is imported from the Ghost Racer template.