Pages: [1]
  Print  
Author Topic: func_door_rotating  (Read 11637 times)
andrewj
Member


Cakes 23
Posts: 571



« on: December 27, 2009, 10:36:14 pm »

Here is the code and demo for func_door_rotating

The patch is against openarena-engine-source-0.8.x-10.tar.bz2, but probably would go into stock ioquake3 very easily.

The main trick with func_door_rotating is to have an "origin brush" as part of the door brush(es), which sets the point around which the object rotates.  This brush should have "common/origin" as the texture on all sides.

A new entity field called "rotatorAngle" controls how far (in degrees) the door rotates.  Default is 90.  Making it negative will make the door swing the other way.  Also spawnflags 32 and 64 can be used to make it swing vertically (around X_AXIS for 32, Y_AXIS for 64).

The demo map is oa_dm1, where the door to the quad swings horizontally and the bridge to the yellow armor swings vertically.  Note that it has no vis and no aas for bots.
Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14480



WWW
« Reply #1 on: December 28, 2009, 04:46:06 am »

Is it REALLY an engine change? Some mods did this on stock q3 engine...1.27.
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
andrewj
Member


Cakes 23
Posts: 571



« Reply #2 on: December 28, 2009, 08:32:34 am »

Only qagame.qvm is changed.
Logged
Udi
Member


Cakes 25
Posts: 536


i do my own stunts


WWW
« Reply #3 on: December 28, 2009, 10:27:42 am »

I think it works great. Can the speed of rotation be changed too? And also can it be made not to hurt the player when someone gets in the way? As I remember in some games the doors could be opened in both direction, always in the opposite direction of the player (the player was always pushing it), so the player won't be knocked back when pulling. I don't know if it's a clever design or a bug, but can that be implemented?
Logged

http://udionline.hu/en/projektek/openarena/
Todo list: 1. q3dm17 textures replacement (95% done)
Cacatoes
Banned for leasing own account
Posts a lot
*

Cakes 73
Posts: 1428


also banned for baiting another to violate rules


« Reply #4 on: December 28, 2009, 10:28:12 am »

A small video here : http://download.tuxfamily.org/openarena/files/videos/openarena-rotating_doors.ogg Wink

I was trying kdenlive so exported that as a try.
Logged

Todo: Walk the cat.
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14480



WWW
« Reply #5 on: December 28, 2009, 12:13:44 pm »

14fps and the game looks THAT UGLY!!?!? WOW YOU NEED AN UPGRADE FROM YOUR PENTIUM 200 JESUS CHRIST its almost 2010 and you're playing like it's 1998

ahem, usually the 'speed' value in the entity could change the rotspeed. HAlflife had annoying double hinged doors and I would desire support for that and have an optional spawnflag for it.
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
Cacatoes
Banned for leasing own account
Posts a lot
*

Cakes 73
Posts: 1428


also banned for baiting another to violate rules


« Reply #6 on: December 28, 2009, 02:00:58 pm »

[offtopic]When you record with the /video command the FPS drop is normal.

Now it's not like I was complaining about anything, I bought that notebook with opensource drivers on purpose.[/offtopic]
Logged

Todo: Walk the cat.
andrewj
Member


Cakes 23
Posts: 571



« Reply #7 on: December 28, 2009, 09:44:59 pm »

Speed, damage, and opening mode (touch or shoot) should all work the same as normal doors.

Double doors should work using normal Q3 entity teaming (i.e. give both sides a "team" "xxx" entity field).
Logged
Falkland
Member


Cakes 6
Posts: 590


« Reply #8 on: December 29, 2009, 11:10:44 am »

As I remember in some games the doors could be opened in both direction, always in the opposite direction of the player (the player was always pushing it), so the player won't be knocked back when pulling. I don't know if it's a clever design or a bug, but can that be implemented?

It is so also in UrT.

Anyway , is this function properly suitable for OA ? Just notice that the gameplay is generally fast while rotating is significantly slower.
Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14480



WWW
« Reply #9 on: December 29, 2009, 11:17:11 am »

Whether it's for OA or not dosen't matter. This subforum retains to programming for id Tech 3 in general, since the coding scene has been greatly disjointed and this forum is a weak attempt at reunion, without bias for ioq3, promode, etc.
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
Pages: [1]
  Print  
 
Jump to: