Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - DougFane

#1
Support / Re: How to attach an oject to the camera
October 18, 2011, 08:07:39 PM
Well first I would like to say, thank you for all the help. Unfortunately, I accidentally overwrote the file of the project I was working on, and post the value that you are asking for. the good news is that while writing test code for the FPS project I was working on, I thought of an alternate game type that seemed a more worthy venture. Rather than create another shooter, I am going for more of a puzzle/adventure type game. The basic premise is that you are trying to get to a spinning monkey head (don't ask) on a platform. You can run and jump like usual, but you can also shoot large red balls which ca be used as stepping platforms. I will make a new post with a zip file attached that contains a fully functional (albeit simple) version of the game.

Thank you for the help Egon and AGP
#2
Support / Re: How to attach an oject to the camera
October 17, 2011, 03:31:18 PM
I think I know what the issue is, and I don't know if this is what you said, but here it is:

_______   is the gun

<  is the camera

faced straight ahead:

_______
       <

faced 90 degrees:
       |
       |
       ^
       |

ans so on...

I think this is what was making me think it was moving in a circular motion, because the gun appears to recede and advance. Is this what you were referring to, and is altering the pivot point going to solve it?
#3
Support / Re: How to attach an oject to the camera
October 17, 2011, 02:11:59 AM
Well I got the 2 * pi idea from the fps example included with the jars. I am loading 3ds objects that are rotated the same way in the file as the example items. Also, I have narrowed down the problem to the line: weapon.align(camera);

Without this line, the item doesn't rotate properly with the camera, but it doesn't move. With this line, it rotates with the camera, but also moves along a circular track.
#4
Support / Re: How to attach an oject to the camera
October 16, 2011, 03:35:08 PM
I am calling build, and the weapon is rotated correctly. It just moves in a circular track around a point just in front of the camera.
#5
Support / Re: How to attach an oject to the camera
October 16, 2011, 01:59:51 AM
Thank you, that helped quite a bit. I actually had to rotate it  by -PI * 2. Now I have a new problem. When the camera spins, the gun kind of slides. I have attached a series of screen shots to show what I mean. When taking these I just rotated the camera for about 1/4 of a second and then took  a screen shot until I came back to the origin. NOTE: I can't figure out how to upload the rar file. So I will just describe the issue. Basically, the object starts on the left side of the screen, and then gradually slides to the middle, then to the right, then back to the middle, then back to the right.
#6
Support / Re: How to attach an oject to the camera
October 16, 2011, 12:43:53 AM
Ok, I got the weapon to stay with the camera, but it doesn't rotate properly. I can get it to either rotate with the camera, but it is pointed straight down, or have it pointing the right way, but it is only viewable when you are looking south in the game.
#7
Support / Re: How to attach an oject to the camera
October 15, 2011, 11:31:13 PM
how could you explain a little further what each of those lines does. I'm not entirely sure I get it.
#8
Support / How to attach an oject to the camera
October 14, 2011, 03:07:33 PM
I am trying to make a first-person shooter type program. I have gotten gravity, movement, and looking to work. But I am struggling to get the weapon to stay with the camera. I want the weapon to stay on the right side of the screen and move with the camera like you see in most first person shooters. But I can't get it to work. Does anybody have any ideas?