'module' object is not callable???
Hi there.:D
I am trying to do something seemingly simple. I want to have an avatar (steve) attached to different views and I am using the roboChase code in my own Player class (shown below). The class works fine if I run it but not when used as a module. More specifically, when I try to create a new Player object (p1=Player(viz.MainView)) then I get the following error: Code:
Traceback (most recent call last): Code:
import viz |
Can you post some example code where you import the module, create the Player object and get the error? The following worked fine for me. The only change I made to the module code was import the vizact library.
Code:
import viz |
Thanks a lot Jeff,
it was eventually my carelessness, since I was using another class name not residing in the module:D The linking works fine besides the fact that I can't get rid of the robot in the first person view, so it collides with the viewpoint and sends it to outer space! I am using the 'renderOnlyToWindows' command but it doesn't work, I assume because of the linking. If, on the other hand, I get rid of the view collision, then I can get through walls which is undesirable. What's the solution in such cases? I have a similar problem with a hand cursor I have linked with the view in 3D space (not screen) which is offset 0.2m in front of the view and the view collides on it only when I am moving straight in one of the 4 directions. The only solution I found was to set the collisionBuffer() to zero, but then whenever I am too close to objects the cursor disappears behind them. Also collideNone() applied to the hand object doesn't resolve the problem. Isn't there a way in both these cases to reset the collision of the object, so that it doesn't collide with the viewpoint?!? It seems such an easy fix but still...:confused: Thanks a lot for your feedback! |
All times are GMT -7. The time now is 05:02 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC