Jump to content

Search the Community

Showing results for tags 'transform'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 19 results

  1. Hey all! I am both new to Babylon and these forums! I want to make a First Person Camera that moves in a direction based on its rotation (e.i. like a forward/backwards functionality with W/S). Only problem is I don't know how to do this without maybe physics engines enabled or making a bunch of really janky movements. I want something like Unity's Transform.forward. How do I achieve this?
  2. Hi Forgive me if I've missed this, but I can't find it in any of the documentation. Is there a way to specify the the rotation of an arcade physics body? I can rotate the game object image, but that has no effect on the physics body. I would have expected a .setAngle or .setRotation method to be available on Phaser.Physics.Arcade.Body. Seems such a simple one to miss, but I keep needing this and having to use matter, which is just a little more fiddly. Thank you!
  3. I was unable to transform mesh instance if the original mesh had a shader material. Is this a bug? I have created a playground example using box mesh. If you open the debug -> mesh panel, you realize there are 6 meshes, but only 5 are displayed. This is because one of the instances in the second row was not transformed properly. On the other hand, clones of meshes with shader material can be transformed properly. https://playground.babylonjs.com/#B2NZ1M#1
  4. Hi, I want to create a ground mesh from a plane. let plane = new Plane(-0.4, -0.2, -0.6, 0.1); //normal and offset let planeMesh = Mesh.CreateGround("planeMesh", 100, 100, 2, scene); //to make the planeMesh to fit the plane, transformation should be added to the mesh planeMesh.rotation = ... planeMesh.positon = ... someone can help me out? Thanks.
  5. Disclaimer: I know this sounds nooby af, but I don't even know how it's called what I want and I do not search for a solution, I search for ideas.(: Maybe you guys played Hearthstone, or any other card game. When you pick up cards from your hand, they do some wobbly fx (<- I'd appreciate to get to know how to call this shit.) because the card has some elastic physics to it. My first idea to do this would be using pixi-projection with some easing to it. But then the question is what to apply with easing to let it look right and not completely fucked up?^^ I guess the scaling should
  6. In unity they have transform.forward, right and up. The docs for unity say the forward is : 'The blue axis of the transform in world space.' using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { public float thrust; public Rigidbody rb; void Start() { rb = GetComponent<Rigidbody>(); } void Update() { rb.AddForce(transform.forward * thrust); } } How would I do this in Babylon.... Yo @Deltakosh or ANYBODY How do we get the forward vector in Babylon... Would this work:
  7. How to create Empty Mesh/Node for Parenting? The Empty Node must have Position, & other Transform data!
  8. Hello. I want to make Sprite size (width, height) transform independent (constant sprite size). What I mean is whenever I change transformation matrix it should apply for coords, but not the size of the sprite. I've been looking into sources and found 2 ways to do that, but I don't like neither of them. 1) Different containers: Right now I change main container's (stage) matrix and it applies for all children in it, which is great, but not in my case. I can split objects that I want to be scale size independent into another container and only sync translation, which is a bit odd to m
  9. So if I have a ground plane, and am looking to manipulate the vertex data but need the values to be updated to their correct position after a rotation and transform that I applied. http://www.babylonjs-playground.com/#DPSB16#3 Is the playground showing the creation and manipulation of the mesh. Basically what I need to happen now is when I grab the VertexData the points will have the rotation and transformation applied. I have a good idea of how to do it manually with some vector manipulation but would like to just "bake" this information then grab it instead of doing a multiple steps.
  10. Good day to all! I have a question on Phaser's world-to-screen transformations, and I've googled almost nothing on it Is there a way to transform a sprite's world coordinates into the screen space (and visa versa)? It is a very useful feature and I can't beleave nobody still interested in it! I found poor documented Sprite.worldTransform.tx, Sprite.worldTransform.ty,but I'm not sure these fields always work properly (to be honest, I am sure they don't). Thank you!
  11. Hi. Im fairly new on Pixi and im trying to do something with multiple renderers. I know i could add multiple canvas instead, however i need a dedicated webgl renderer to manipulate the transform and try to do some trapezoid forms. I also need both renderers to works on the same canvas to avoid creating multiple layers on the document.body. My approach was: 1. Have a main renderer and a main stage. 2. Have a sideRenderer that will be affected by different transforms (using gl.uniformMatrix4fv to change the shape of the whole renderer and achieve different shapes) and a sideStage tha
  12. It seems that Sprite.getBounds returns camera-relative coordinates. The docs say "Returns the bounds of the Sprite as a rectangle. The bounds calculation takes the worldTransform into account" which would indicate to me that they give world coordinates. However, looking at the code a bit, it seems that in a simple game you might have the hierarchy: Stage -> World -> Group -> Sprite And if the camera is at position (100,100), then that means the World's transform is at (-100, -100). Then, when getBounds is called on the sprite, it traverses its parents, accoun
  13. When transform is added to parent, it's also added to children right? In some case I don't want this - I want to control my self, how children reacts when parent transform is changed. Can I do that? Any advice?
  14. Hello, As a frame of reference, in Helix Toolkit for WPF (C#, .NET), I am calculating and rendering some coordinates to model a football Goal Post, or pylons at the end zone corners if you prefer. I want to start with a single set of coordinates, and apply a transform that basically mirrors those coordinates on either end of the field, end zone, or what have you. This is extremely easy to apply using the WPF view XAML. Let's say I have the points for the post; 180 feet from either end of center field (Z axis): // assuming "world" coordinates originate at center field, measur
  15. Hello, I want to use setTransform method of canvas in pixijs. Is there any interface in pixijs to apply this concept. I have tried implementing like this: displayObj.localTransform = [1, 1, 1, 1, 0, 0]; but its not working. Please suggest. Thanks vbh
  16. I have an animated character scene that has an animated, rigged, skinned mesh for the character and some other rigged meshes for equipment. Babylon doesn't like how the equipment is animated when I export from 3dsmax to Babylon it doesn't animate the equipment meshes. I'm not sure whats special about the equipment meshes I think they are transforms? Here is a video of the animation rendered from 3dsmax: Here is a video of the animation exported to Babylon: I'm not sure whats going on here I got the model from a 3rd party and animation is not my skill set. Heres a closer look at one of t
  17. Hi, I am using Phaser with TypeScript and encountered some strange behavior: If I create some shape objects and change the position of one of them, the new position is applied to it (relative to the initial position) and to all other objects as well. I want to change the position of only one object, not all. How can I achieve that? here is some code for testing: class Main { game: Phaser.Game; graphics: Phaser.Graphics; constructor() { this.game = new Phaser.Game(800, 600, Phaser.AUTO, 'content', { create: this.create }); } crea
  18. Hello, I'd like to know if there is a method to calculate the position and the rotation from a transform matrix. In my case i calculate a transform matrix and i want to apply it to my mesh. I tried mesh.setPivotMatrix but i don't want to move the pivot, i want to move the mesh. So i have to move my mesh with mesh.position and mesh.rotation. It changes the worldmatrix of my mesh and i want this new worldmatrix equal to my transform matrix. That's why the function setWorldMatrix could be the theoretical solution of my issue. Thanks
  19. Hi, I got my sprite, who is 58 x 74 and i set it body at this.sprite.body.setSize(30, 63, 6, 11);It's a character, so when i press the left button i scale it at -1 in X. But i don't know how i can adjust the body size. There's a screenshot of both position, how can i adjust the left one? Thank you
  • Create New...