Q3D V-2.4 [3D Physics + Skeletal Animation UPDATE]

From the Asset Store
Fantasy Game includes more than 600 sound effects inspired by hit computer games like World of Warcraft and Diablo.
  • try adding the objects to the camera (making the camera the parent of the object). That should allow you to move the camera and the child objects will move with it.

  • actually, I don't know if q3d allows you to do that (since you can't pick a camera when changing the parent), but three.js does allow it.. so might be something QuaziGNRLnose could implement.

  • purplemonkey

    Prominent

    Although parenting to the camera seems like it should be a good solution for a UI, it allows objects to "penetrate" the UI which will look weird. Optimally you can use 2 Q3D Viewports, and create an extra scene with a fixed camera and your UI objects with a 0 alpha background, and layer that above a view-port for the main games scene. If you really need to parent objects to the camera just make an dummy object which sets angle/positon to the cameras x/y/z position and rotation, but again for a UI this isn't the best option.

    If you use a Q3D Viewport, You can make the view-port small to make it render a smaller area if the UI is only something like a bar at the top, it doesn't have to encompass the entire area. For 2D ui's it's best to just use the construct 2 canvas as a "layer" itself with behind mode set on Q3D Master.

    Using extra scenes is a bit weird but the main things you have to know is:

    1. By default, everything is created in the scene named "Default", and this scene is picked.

    2. To use another scene, you need to first create a scene with a unique name like "MyScene", similar to how multiple cameras work.

    3. To add objects / change properties / do anything really with a specific scene, you need to pick it with the "Pick scene" action in Q3D Master, similar to how multiple cameras work.

    4. Once the scene is picked, any actions that have anything to do with a scene will affect the "picked" scene. e.g. change background, parent an object to a scene, create an object, change fog, etc. the only exception are cameras which exist independently of any scene (they're global to all scenes, so they don't exist in any one scene).

    5. To move objects between scenes you need to use the action that parents them to the scene in the hierarchy section. so you need to pick the scene you want to move them to first.

    6. To affect the default scene again, just re-pick it with the "pick scene" action, the name it uses is "Default".

    7. To rendering multiple scenes is as easy as writing the scene name / camera name in the viewport properties and layering them as you please. Semi-transparency won't render properly between viewports though due to renderer design.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • purplemonkey could you please help me with minecraft example like on as i can't figure out the example as how to make it work with q3d plugin ?

  • Hi QuaziGNRLnose,

    I am trying to build something like as in here - threejs.org/examples/webgl_inter ... inter.html

    I understood that I have to use the Q3Draycaster for this and tried working my way with the plugin. I have looked at the example of Raycaster and viewports.capx in this regard.

    However, I am stuck with some basic questions like -

    1. how do I pickup the cube and limit the cube movement in 3d axis while moving it only the grid.

    2. how to move it step by step on the grid in x or y directions (exactly into the square positions) along the grid

    3. Should I make the grid a Q3DModel object having one single object OR multiple square Q3DModel objects connected together?

    4. How can I place the cube only on top ( if there is a cube already at the bottom) etc., To do this, would I need to use collision testing feature as well?

    5. I think I can pick up the cube using the 2 conditions - Q3DViewport projection point in frame to mouse co-ordinates and Q3Dviewport --> Project,pick 1st, then I see I can pick-up the cube? Then should I use Q3Draycaster to move the cube along the raycaster? If so, how can I move along the raycaster? (Also, I assume I have to position the Q3Draycaster to cameraposition.xw, cameraposition.yw, cameraPosition.zw and direct it at the highlighted cube model?)

    Do you see this as relatively easy one to build OR slightly complex? Any quick helpful pointers on how to achieve this functionality would be really helpful.

    Did you have any success with your problem as I am facing the same issue & little bit confuse as where to start ..... if you can guide me as where to begin working to create the same voxelpaint example from threejs.org ....

  • miketolsa, Frankly I didn't try further implementing this using Q3D after raising this issue. It sounded slightly complex for me to take that route...So I tried an alternate route of managing the same in 2D but faking 3D (ie., w/o threejs/Q3D plugins.). I managed this by laying an isometric board in 2D, keep track of each cell index, and then manipulate the z-order along with checking if that particular cell is occupied by how many number of cubes. I managed to get a very similar thing although without Q3D...

  • could you provide a sample file if possible ......

    Also if you are using a isometric board then you can't rotate the board in 3d ? so is that possible in 2d, I mean like the way you did ?

  • Okay, so I tried imitating that three.js voxel painter by using the RTS example provided by QuaziGNRLnose

    It went so-so, I don't really have the time right now to figure out an easy solution for the snap-to-grid mechanic nor stacking of object. But other than that, it's all there.

    Try it

    Download Capx

    (LMB to create a box and RMB to destroy it. Camera controls are WASD, hold MMB to rotate, hold RMB to move, mouse scroll to zoom in/out.)

  • purplemonkey this is really awesome !!!

    would learn a lot from this example ......

  • miketolsa Try again, it seems to work fine for me.

  • So, I have a question:

    The morph animation example shows a room with various Quake characters and so on. It has a floor and 4 walls. Is it possible to create objects that are above the characters but that also allow the characters to walk under them? Like a floating platform for example.

    I toyed around with this for some time now but it doesn't really seem to work, not sure if that's me, the plugin or C2 restrictions. One of the things I tried was to compare the player's Z with the floating platform's Z and if that Z is smaller than the player's, then it should allow the player to walk under it by disabling collisions etc..

    Example: Player Z = -50. Floating platform Z = -200. Is platformZ smaller than playerZ? Yes. Disable collisions + remove solid. Doesn't work.

  • purplemonkey, this is nice. I know its quick and simple example...however, I am unable to detect collisions OR place a cube on top of other cube.

  • miketolsa, you are right that we cant rotate the view in 2D in the isometric grid approach that I have used.

  • kmsravindra Yeah, I messed around with it a bit more just now and added collision checks and a rather iffy snap-to-grid. I fiddled a bit with stacking but I'm not sure of the best way to go about it.

    I 've updated the example ( you might have to delete cache or just refresh a couple of times to see the new HTML version) + capx file. This is unfortunately all the time I have for this particular project, so someone will have to continue to build upon the project if they want it to work well..

  • purplemonkey, this looks quite good and a great start in the right direction. Thanks for putting it together.

Jump to:
Active Users
There are 3 visitors browsing this topic (0 users and 3 guests)