tag:blogger.com,1999:blog-8622129831031492300.post6369187263227884086..comments2023-08-04T01:58:10.936-07:00Comments on TheInvader360: First 3D projectTheInvader360http://www.blogger.com/profile/07852741032840399885noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-8622129831031492300.post-26129802322514207852013-04-28T01:53:26.418-07:002013-04-28T01:53:26.418-07:00Hi Leonidas, sorry it has taken me so long to repl...Hi Leonidas, sorry it has taken me so long to reply... I guess you have solved your third person camera issue by now?<br /><br />In WorldRenderer3D we have:<br />camera.position.set(world.getPlayer().getCentrePos().x * 2f, world.getPlayer().getCentrePos().y * 2f, 0.75f);<br />camera.rotate(world.getPlayer().getRotation(), 0, 0, 1);<br /><br />Moves camera to player position in world coordinates, and rotates around the z-axis to match player rotation. To have the camera 2f behind the player, I'd change the positioning using trigonometry - 2f distance and player rotation angle should be all you need.<br /><br />However, I'm not convinced that this is the best way of doing things. It seems the usual way of doing things in opengl is to have a static camera, and move game objects around. There are no doubt nice transform matrix methods to allow you to do what you want, I have a habit of going down the math/trig route but there may be simpler ways of doing things.<br /><br />If you have already solved your problem, I'd love to see your code to see how you've done it :)TheInvader360https://www.blogger.com/profile/07852741032840399885noreply@blogger.comtag:blogger.com,1999:blog-8622129831031492300.post-48368609574989621622013-03-31T08:41:38.708-07:002013-03-31T08:41:38.708-07:00hello how are you?
Thanks to your example eh mana...hello how are you?<br /><br />Thanks to your example eh managed to make the maze and change the coordinates of the game (do not know why but your tapeworms in the x, y), for x, z I find it easier to work.<br />Also change the collisions to work with the Vector3 class is easier to work (with the code "if (payer.getPosCentro (). Dst (gems.get (i). PosCentro) <1.0f)" we can ask the :) easily collision.<br /><br />But now placed a 3D model of the hero in the coordinates and the camera to 2f away the hero, but I could not get the camera follows the hero.<br /><br />would know how to do to get my game camera behaves in third person?<br /><br />or theory at least necessary to ensure this.<br /><br />again thank you very much for your help I am very happy with the results. When I go to the source so you can see :)Leonidashttps://www.blogger.com/profile/16736750249594559727noreply@blogger.comtag:blogger.com,1999:blog-8622129831031492300.post-31904396455247780122013-03-24T09:58:50.824-07:002013-03-24T09:58:50.824-07:00jejeje ok, thanks again for the source :)
if i fi...jejeje ok, thanks again for the source :)<br /><br />if i finish something i will show you :)<br /><br />Leonidashttps://www.blogger.com/profile/16736750249594559727noreply@blogger.comtag:blogger.com,1999:blog-8622129831031492300.post-78059145000337960532013-03-22T12:30:00.855-07:002013-03-22T12:30:00.855-07:00Hey Leonidas, thanks for commenting :) You have in...Hey Leonidas, thanks for commenting :) You have inspired me to reupload the sourcecode, check it out here - https://github.com/TheInvader360/arena-roamer.git<br /><br />I hope you find it useful. I wouldn't suggest following what I've done too closely as this was very much a trial and error learning exercise for me, and I've since learnt a little more and would do some things differently, but hey, it runs, it works, I guess that's all a game HAS to do really...<br /><br />Maybe I'll come back to this one at some point. I have so many unfinished projects it's not even funny... But at least some of them get released, which is better than nothing :)<br /><br />Have fun, and if you end up making any interesting games be sure to let me know!TheInvader360https://www.blogger.com/profile/07852741032840399885noreply@blogger.comtag:blogger.com,1999:blog-8622129831031492300.post-55368557739380411562013-03-21T18:16:51.015-07:002013-03-21T18:16:51.015-07:00the source code don't work :( but looks very g...the source code don't work :( but looks very good :) Leonidashttps://www.blogger.com/profile/16736750249594559727noreply@blogger.com