MPPlantOfficial's Forum Posts

  • Set the Sprite size to 1x1 and the position to 0,0

    Well that worked! Thank you.

    But I don't understand why I needed to set it like that before it would appear

  • As you can see the sprite I want to stretch becomes invisible what attempting to display it.

    I'm guessing they're occupying the exact same spot but I cannot see anything wrong with my code for it to end up that way

    dropbox.com/scl/fi/zvrimutedfl95rzzjw1wb/MyMeshTest.c3p

  • hi. the variable you want to play with is dt.

    So an example like:

    global number : TIME_MAX = 10

    every tick | subtract dt from TIME_MAX

    would be a countdown starting at 10 minus time passed.

    You can modify it by including a multiplier for dt like 0.5*dt is slower by a factor of 2. You get the idea

  • Hi I've managed to implement your suggestion and aside from the fairly jumpy Z component, I'm quite happy with the result.

    To anyone following here's the link:

    dropbox.com/s/p5eacrlgjkapccb/FPS_look.c3p

  • Summoning R0J0hound

    Any workarounds with how 3DCamera rotate works?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi guys since I haven't been able to change the 3D Camera rotate camera values I've resorted to using variables instead but I'm not quite getting the desired effect.

    link: dropbox.com/s/exorhi93zglhid5/FPS_mouseTest.c3p

    Tagged:

  • Bump.

  • This is the exact same problem I have found from this thread:

    construct.net/en/forum/construct-3/general-discussion-7/3d-camera-plugin-rotation-173217

    I'm having this problem too. Setting an intial rotation "on start of layout" may show it right when the layout restarts, but when I move the mouse (camera is set to rotate by mouse movement) the camera jumps back to the previous rotation value and continues from there, not the initial position.

    My game on the Scirra arcade exhibits this issue. Die on any level and it will restart facing the level sign, but moving the mouse will snap back to the previous rotation before death. (It's something I keep trying to fix. I worked around it by not having any enemies appear until you are actually in full control of your rotation direction so having to adjust the camera rotation isn't fatal.)

    https://www.construct.net/en/free-online-games/vault-peril-32857/play

    Maybe someone's come up with a solution in the last few months?

  • I'm attempting to make a game that views multiple camera angles like a FNAF type but once it restores to previous camera it seems to store/remember the value of 3DCamera.CameraXRotation

    I would like to make it so it resets to Zero each time I switch to a different camera angle

    Tagged:

  • Your code wasn't correct. The total length is zero because you set it to zero when loopindex=p.count-1 aka at the last instance. It should be loopindex=0 like in the pseudo code. Also you don't need to use abs() with distance because distance is already always positive, but that has no effect.

    The verlet rope physics doesn't work too well when wrapping around small obstacles as you noted in the layout. It can be improved by decreasing the distance between links and/or running the physics with multiple smaller timesteps, but it still can fail. I think it could be improved by doing collision detection/response between the obstacles and the lines between links, but that's not a simple to solve with the circle vs sdf collision detection used.

    Alright. I'll be experimenting with your variables further to get the results I want.

    Thank you!

  • Can't open your file. I think it's not publicly shared?

    Probably that wait is causing problems, but I can't really follow it.

    Anyways this should measure the total length between multiple instances of sprites making up the chain.

    var totalLength=0;
    
    for "" 0 to p.count-1
    -- loopindex = 0
    -- -- set totalLength to 0
    -- else
    -- -- add distance(p(loopindex-1).x,p(loopindex-1).y,p(loopindex).x,p(loopindex).y) to totalLength

    hi thank you for your reply.

    I fixed the link.

    I also applied your suggested loop but for some reason I'm getting a summation value of 0. With the link accessible now maybe you could figure out what's wrong with my code

  • Hi guys. I'm attempting to measure the distances between chain links made up of a single sprite.

    I am using R0j0s verlet motion as a base cp3 file.

    I made a loop in the c3p as visible here to add up distances.

    Theoretically the displayed summation of distances should always be no less than the assigned distance in between times sprite count which in this case is 8*31 but in execution, in my loop at least, I seem to be ending up with values less than that moving my main character sprite around. I seem to only be measuring the distances between the first the last link.

    file: del

    I need help pointing out what I did wrong and how I may fix this loop. Thanks.

    EDIT: Also is there a way I may store the summation variable so I can create a set of events like :

    if summation > theoretical max = do this..

    with the nature of the SumDistance variable being in a constant state of flux inside the loop how would that work?

  • I find that I'm able to get Char.Car.VectorX / Char.Car.VectorY but find the possible actions of the Car behavior to be pretty limiting. I am only able to modify the values associated with the car function or simulate control but have limited options doing so.

    Is there another way to set these Car parameters?

    I am using a base cp3 where the Char currently uses the 8direction behavior and other objects make use of its Char.8direction.VectorX/Y variables but for the game I'm making it's important to specifically have Tank Controls.

    Tagged:

  • Alternatively to using the physics behavior you can do some event based physics. Gives endless things you can tweak to give better results at times.

    You can find more info about this method online by looking up "verlet rope physics".

    Anyways, this roughly follows that with additional tweaks.

    The collision detection was probably the most math. I kind of liked the effect of the chain pulling the player, but you can tweak the mass in event 2 to make the player less or more affected.

    https://www.dropbox.com/s/p9fdgbpk59dvc4h/verlet_4.capx?dl=1

    Wow this is amazing! I was playing with the variables turning off the

    -> p: Add Self.fixed?0:500×mdt to vy

    to try and simulate the ball and chain effect in a space.

    I was wondering how do I modify it such that the links stop moving after a while like if there was friction/air resistance. I was playing around with the mass variable but noticed it also affected the sprite's movement speed

    drive.google.com/file/d/18q95c7g0DQxPitB7UBrzSil9aNhUZ7Dt/view

  • I haven't been here in a long time but logged in again out of curiosity and read your latest blogs and you guys are killing it with these new feats!!! O:

    But more importantly, monthly subscription plans? That's flexible!!

    Will be subscribing again for sure! Cheers!