I’m using the IrrKlang sound library to create 3D sounds in a game. Problem is the listener set is looking for a Vector3D position, but the variables I have are in Vector3. How do I work around this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Simply convert your Vector3 to a Vector3D, since Vector3D is simply a struct with X, Y, Z member variables to represent the x, y, z components a function like this should work fine:
Perhaps you could implement it as an extension to Vector3 (i.e. Vector3.ToVector3D()), but at any rate converting your Vector3 to Vector3D is very trivial and the above code should help 🙂