Sir LoLz's Forum Posts

  • Hello.

    I am working with a 3d plugin and want to do doom style graphics were enemies are sprites. I am stuck trying to figure out how to make the correct animation play depending on what direction an enemy is facing relative to the player though.

    I have 8 animations named something like "action0) were "action" is what the animation is of the character doing (idle,walking, ect) and the number at the end is the direction.

    I first looked at finding the difference of angles between the camera and enemy but quickly found out that would not return the correct angle of facing.

    any help would be appreciated

    Thanks

    UPDATE: So after some extra digging I know I need a dot product. This is the equation as I understand it ( (a1,a2)•(b1,b2) = a1b1 + a2b2 )

    but the test I set up does not seem to be working (is not returning a number between 1 and -1 ). no doubt its staring me in the face but I have brick walled. any input?

    UPDATE 2: so I think I solved it

    the above math was correct in that it was indeed giving a positive or negative value related to the facing of the enemy relative to the player. it just was not in the range of 1,-1

    I seem to have gotten it inside that range though regardless of the distance by taking the distance of the player and enemy and multiplying it by 3. and then dividing the dot product by this number. it seems to be working so I will stop with this result.

    as you can see in the two screenshots in the image the dot product is now inside the 1,-1 range regardless of the distance.

    UPDATE 3: seem to have the solution implemented.

    no doubt there is a cleaner way of doing this but my solution is to get the dot product for both the front and side. this way I can see how forward and how sideways facing the entity is. I then compare the front dot value to see if it is front or rear facing and then compare the side dot to see what side is facing.

    Video of the effect in action. I am not sure if it's perfect but it seems ok to me.

    Subscribe to Construct videos now
  • Has anyone figured out how to do sprite billboarding in with Q3D in C2? I would like to do doom style rendering with sprites that will change the animation based on what direction the other sprite is facing. But I can't figure out how to determine what sprite to display based on the direction of the entity relative to the player.

  • problem is that is a big hurdle. most of the short comings can be worked around. but not being able to play 3d animations well is a major hurdle.

  • coming to this late. but what is the advantage of this plug in over the normal multiplayer plugin?

  • This is an awesome plug in. Thanks.

  • oh I figured it out and as I suspected it was something simple I was overlooking. the camera option in the Q3d master was set to Orthogonal. not Perspective.

    Thanks

  • I have attached a copy of the capex to this post. There should not be that much going on.

    https://www.dropbox.com/s/x8xntm7tp8239fr/mode%207%20game.capx?dl=0

  • I must be missing something trivial because it's still not working.

    I added a new variable called "scale" that takes the pre existing size of objects and multiplies to that scale. It will also multiply the cameras distance by said scale.

    However the culling still happens. if I move the camera high enough yes it stops. but at that height it stops being behind the player.

    Also there is an odd distortion going on. I must be overlooking something.

  • I seem to be having issues with culling.

    I am working on a mode 7 style project. I have a plane with a texture and a box that would represent the player. however the plane is getting culled before it reaches the bottom of the screen.

    I tried fixing it with the "near plane" in frustum setting. but this does not seem to do anything.

    ideas?

  • Hello.

    In my project items are stored outside the player for ease of access and all are part of a family.

    when a player uses an item it will play an animation on the player. My desire is that I can set how long the animation should play based on how long it takes to use the item.

    As of now I determine that with "item.timer * player.AnimationFrameCount This works fine on the player side.

    But on the item side I am not sure how to have the math calculate time properly. For instance say I want an item to last half a second. If I put 0.5 in for "half a second" the timer variable it plays 2 seconds. and if I set it to 1.5 for "one and a half seconds" it plays at 2 thirds a second speed.

    I understand the mathematical reason why. But how can i convert 1.5 to one and a half seconds, 0.5 to half a second. and so on?

    Edit: I figured it out but I will go ahead and leave this up for others to find.

    all I had to do was divide one by the length of time provided in the variable. So my final formula is (1 / items.timer) * players.AnimationFrameCount

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Whatever happened to the Babylon plug in? You can find it's listing in the store but it does not have a page anymore.

  • QuaziGNRLnose

    Thanks! very helpful. however it seems to be lacking. for example 2.2 installing three.js exporter for blender is missing. I was also hoping it would cover the basics of animation rigging/exporting/importing/playing. I also wounder if it can play multiple animations on the same object. say "walking" on legs and "reloading" on a torso.

  • For who is looking for the example files or manual, i took the liberty to upload them to my google drive they should be available as long as google drive doesn't close their services in the future.

    Download Examples + Manual

    Examples

    Manual

    In case you forgot how to download Q3D if you purchased it, here is the link

    That being said, it still remains useful for C2 projects.

    My last test shows compatibility with latest Construct2 Stable Version for desktop and browser - i didn't yet tested on mobile platforms.

    (don't forget if you are using it in your project, don't minimize/scramble your script it will stop working)

    those links don't work anymore. would you happen to have the manual still?

  • Heyo.

    I am sure most of us have tried a table top RPG at some point. I recently got into them a few months ago with some friends. sadly though we can't always be together on the same night due to some of us not having a vehicle at the time.

    To get around this I made an online app that creates a virtual table top. up to 15 users can connect.

    Sure their might be other more developed apps out there. But they cost money. While my app does not have all the bells and whistles I feel it has the basics. Plus it runs in a web browser and has cross play with PC and tablets. So that is a plus.

    andyshat.com/vmat

  • how did you solve it? I am having the same issue. need to test in NW.js but can only have one instance going