Results 1 to 2 of 2

Thread: Beamweapon Billboarding

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2004

    Beamweapon Billboarding

    I've been thinking about this for a few days but my brain is fried, so I'll try and get some outside input to see what other people think.

    I want to use a sort of billboarding effect, but not in the standard sense. What I want to be able to do is draw beam-weapon type effects, which can be drawn with a quad and will look the same from--almost--any angle.

    The method I thought of was supplying a function with a vector which would become the Z axis. The Y axis would point directly at the viewer. YxZ would produce the X axis, and then I should be able to just draw a quad in the XZ plane and have it show up properly, as long as the Z axis is not nearly colinear with the Y axis through the viewer, right?

    But for some reason it's giving me mucho trouble. Have I done something horrendously wrong? One thing giving me trouble is keeping everything in the same space; while I can easily specify the Z vector in world space, the Y vector can most easily be taken out of the right column of the modelview matrix, but that will be in eye space. I want to avoid having to pass a ->camera vector to the function so when I implement a class hierarchy of objects that will inhabit the game world I won't have to worry about beam weapons knowing which camera is "turned on."

    Perhaps my math is just wrong?

  2. #2
    Junior Member Newbie
    Join Date
    Sep 2004

    Re: Beamweapon Billboarding

    I fixed it. I'm a such a moron, I had a wrong coefficient in my cross product function!

Similar Threads

  1. billboarding
    By Alessandro_dup1 in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 06-15-2003, 08:21 AM
  2. Billboarding
    By Jan in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-10-2002, 10:32 AM
  3. Billboarding???
    By imported_Dan in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-10-2000, 06:22 AM
  4. Billboarding???
    By imported_Dan in forum OpenGL: User Software
    Replies: 1
    Last Post: 03-07-2000, 10:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean